Use set -e to handle errors better in the build scripts

This commit is contained in:
DemonWav
2016-04-03 02:23:19 -05:00
parent aeea23a135
commit ed05173181
11 changed files with 118 additions and 48 deletions

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env bash
(
set -e
basedir=$(realpath "$1")
workdir="$basedir/work"
mcver=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
@@ -7,7 +10,7 @@ vanillajar="../$mcver/$mcver.jar"
(
cd "$workdir/Paperclip"
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar" || exit 1
mvn clean package "-Dmcver=$mcver" "-Dpaperjar=$paperjar" "-Dvanillajar=$vanillajar"
)
cp "$workdir/Paperclip/target/paperclip-${mcver}.jar" "$basedir/paperclip.jar"
@@ -16,3 +19,4 @@ echo ""
echo ""
echo "Build success!"
echo "Copied final jar to "$(realpath "$basedir/paperclip.jar")
)