changes suggested by dqfna2012. thanks!

main
Evan Hemsley 2020-05-01 23:06:09 -07:00
parent 42b60c04dd
commit 40ebc20f4d
1 changed files with 6 additions and 5 deletions

View File

@ -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"