Use set -e
to handle errors better in the build scripts
This commit is contained in:
parent
7effde04b1
commit
0394633734
11 changed files with 118 additions and 48 deletions
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
(
|
||||
set -e
|
||||
PS1="$"
|
||||
basedir=$(realpath "$1")
|
||||
workdir="$basedir/work"
|
||||
|
@ -15,7 +17,9 @@ function cleanupPatches {
|
|||
|
||||
testver=$(echo "$diffs" | tail -n 2 | grep -ve "^$" | tail -n 1 | grep "$gitver")
|
||||
if [ "x$testver" != "x" ]; then
|
||||
set +e
|
||||
diffs=$(echo "$diffs" | sed 'N;$!P;$!D;$d')
|
||||
set -e
|
||||
fi
|
||||
|
||||
if [ "x$diffs" == "x" ] ; then
|
||||
|
@ -45,3 +49,4 @@ function savePatches {
|
|||
|
||||
savePatches "$workdir/Spigot/Spigot-API" "Paper-API"
|
||||
savePatches "$workdir/Spigot/Spigot-Server" "Paper-Server"
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue