From 40ebc20f4d87c0508c3a16679d4d8e52962948ff Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Fri, 1 May 2020 23:06:09 -0700 Subject: [PATCH] changes suggested by dqfna2012. thanks! --- install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 781542a..a7fe7a1 100755 --- a/install.sh +++ b/install.sh @@ -46,12 +46,12 @@ function getLibs() # Decompressing echo "Decompressing fnalibs..." - mkdir -p $MY_DIR/fnalibs - tar xjC $MY_DIR/fnalibs -f $MY_DIR/fnalibs.tar.bz2 + mkdir -p "$MY_DIR"/fnalibs + tar xjC "$MY_DIR"/fnalibs -f "$MY_DIR"/fnalibs.tar.bz2 if [ $? -eq 0 ]; then echo "Finished decompressing!" echo "" - rm $MY_DIR/fnalibs.tar.bz2 + rm "$MY_DIR"/fnalibs.tar.bz2 else >&2 echo "ERROR: Unable to decompress successfully." exit 1 @@ -59,6 +59,7 @@ function getLibs() } getLibs +pullFNA read -p "Enter your project name or 'exit' to quit: " newProjectName if [[ $newProjectName = 'exit' || -z "$newProjectName" ]]; then @@ -67,9 +68,9 @@ fi # copy everything into new dir NEW_PROJECT_DIR="$MY_DIR/../$newProjectName" -cp -R $MY_DIR $NEW_PROJECT_DIR +cp -R "$MY_DIR" "$NEW_PROJECT_DIR" -cd $NEW_PROJECT_DIR +cd "$NEW_PROJECT_DIR" files=(ProjectName.Core.sln ProjectName.Framework.sln .gitignore ProjectName/ProjectName.Core.csproj ProjectName/ProjectName.Framework.csproj ProjectName/ProjectNameGame.cs ProjectName/Program.cs .vscode/tasks.json .vscode/launch.json) for file in "${files[@]}"; do sed -i -e "s/ProjectName/$newProjectName/g" "./$file"