forked from MoonsideGames/FNA-VSCode-Template
sed fix on OSX only
parent
6d5ee0891d
commit
1e2203e081
|
@ -7,6 +7,8 @@
|
||||||
# Get the directory of this script
|
# Get the directory of this script
|
||||||
MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
|
||||||
|
FNA_VERSION=20.07
|
||||||
|
|
||||||
readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";}
|
readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";}
|
||||||
|
|
||||||
# Checks if git is installed
|
# Checks if git is installed
|
||||||
|
@ -25,7 +27,7 @@ function pullFNA()
|
||||||
checkGit
|
checkGit
|
||||||
git submodule add https://github.com/FNA-XNA/FNA.git
|
git submodule add https://github.com/FNA-XNA/FNA.git
|
||||||
cd FNA
|
cd FNA
|
||||||
git checkout 20.07
|
git checkout $FNA_VERSION
|
||||||
cd ..
|
cd ..
|
||||||
echo "Updating to the latest git version of FNA..."
|
echo "Updating to the latest git version of FNA..."
|
||||||
git submodule update --init --recursive
|
git submodule update --init --recursive
|
||||||
|
@ -79,7 +81,9 @@ 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"
|
||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
rm ./${file}-e
|
rm ./${file}-e
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
mv ./ProjectName.Core.sln "./$newProjectName.Core.sln"
|
mv ./ProjectName.Core.sln "./$newProjectName.Core.sln"
|
||||||
|
|
Loading…
Reference in New Issue