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
|
# Decompressing
|
||||||
echo "Decompressing fnalibs..."
|
echo "Decompressing fnalibs..."
|
||||||
mkdir -p $MY_DIR/fnalibs
|
mkdir -p "$MY_DIR"/fnalibs
|
||||||
tar xjC $MY_DIR/fnalibs -f $MY_DIR/fnalibs.tar.bz2
|
tar xjC "$MY_DIR"/fnalibs -f "$MY_DIR"/fnalibs.tar.bz2
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Finished decompressing!"
|
echo "Finished decompressing!"
|
||||||
echo ""
|
echo ""
|
||||||
rm $MY_DIR/fnalibs.tar.bz2
|
rm "$MY_DIR"/fnalibs.tar.bz2
|
||||||
else
|
else
|
||||||
>&2 echo "ERROR: Unable to decompress successfully."
|
>&2 echo "ERROR: Unable to decompress successfully."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -59,6 +59,7 @@ function getLibs()
|
||||||
}
|
}
|
||||||
|
|
||||||
getLibs
|
getLibs
|
||||||
|
pullFNA
|
||||||
|
|
||||||
read -p "Enter your project name or 'exit' to quit: " newProjectName
|
read -p "Enter your project name or 'exit' to quit: " newProjectName
|
||||||
if [[ $newProjectName = 'exit' || -z "$newProjectName" ]]; then
|
if [[ $newProjectName = 'exit' || -z "$newProjectName" ]]; then
|
||||||
|
@ -67,9 +68,9 @@ fi
|
||||||
|
|
||||||
# copy everything into new dir
|
# copy everything into new dir
|
||||||
NEW_PROJECT_DIR="$MY_DIR/../$newProjectName"
|
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)
|
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
|
for file in "${files[@]}"; do
|
||||||
sed -i -e "s/ProjectName/$newProjectName/g" "./$file"
|
sed -i -e "s/ProjectName/$newProjectName/g" "./$file"
|
||||||
|
|
Loading…
Reference in New Issue