exit scripts if the build fails

This commit is contained in:
Ell 2022-01-08 16:13:14 +01:00
parent 2f19a03d30
commit a40d08209b
4 changed files with 4 additions and 4 deletions

View file

@ -2,7 +2,7 @@
rem move to the script directory
cd /d "%~dp0"
rem build the mod
dotnet build
dotnet build || exit /b
rem zip the mod
cd ./bin/Debug/net6.0
for /F %%p in ('dir /b "*.dll"') do (set file=%%p)

View file

@ -2,7 +2,7 @@
# move to the script directory
cd "$(dirname "$0")"
# build the mod
dotnet build
dotnet build || exit
# zip the mod
cd ./bin/Debug/net6.0
file=$(find *.dll -print)

View file

@ -2,7 +2,7 @@
rem move to the script directory
cd /d "%~dp0"
rem build the mod
dotnet build
dotnet build || exit /b
rem copy the mod to the mods folder
robocopy ./bin/Debug/net6.0/ "%LOCALAPPDATA%/Tiny Life/Mods" /e /is
rem run the game

2
Run.sh
View file

@ -2,7 +2,7 @@
# move to the script directory
cd "$(dirname "$0")"
# build the mod
dotnet build
dotnet build || exit
# copy the mod to the mods folder
cp -r ./bin/Debug/net6.0/* "$HOME/.local/share/Tiny Life/Mods"
# run the game