sed remove only on OSX

main
Evan Hemsley 2020-07-11 14:39:35 -07:00
parent 4f015794f2
commit ab57b03871
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,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"
rm ./${file}-e if [ "$(uname)" == "Darwin" ]; then
rm ./${file}-e
fi
done done
mv ./ProjectName.Core.sln "./$newProjectName.Core.sln" mv ./ProjectName.Core.sln "./$newProjectName.Core.sln"