I'm trying to run a script that installs some files in a directory a user specifies. Once the user specifies the directory, I'd like to transfer the main file to that directory so it can perform so more tasks there before ultimately deleting itself once complete.
#prompt for directory in which to build project
read -p "Drag and drop the directory in which you'd like to build this project: "
echo "reply is $REPLY"
cp ./myScript.sh $REPLY
/bin/bash $REPLY/myScript.sh
I've got the script to execute the file from this question. I tried doing it with source $REPLY/myScript.sh
as well as simply sh $REPLY/myScript.sh
. I get the error /path/to/file/ is a directory
It must be that it doesn't known I'm trying to run myScript.sh, but I don't understand how I've given it a directory.