forked from MoonsideGames/FNA-VSCode-Template
changes suggested by dqfna2012. thanks!
parent
42b60c04dd
commit
40ebc20f4d
11
install.sh
11
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"
|
||||
|
|
Loading…
Reference in New Issue