fix: exit on errors correctly
This commit is contained in:
parent
d1ccf0e1d4
commit
00d7fdace6
1 changed files with 9 additions and 2 deletions
11
apatch
11
apatch
|
@ -2,8 +2,15 @@
|
|||
|
||||
startdir="$PWD"
|
||||
|
||||
[ -f APKBUILD ] || ( echo "please run this in a package directory"; exit 1 )
|
||||
[ "$1" != "" ] || ( echo "usage: apatch <patch name>"; exit 1 )
|
||||
if [ ! -f APKBUILD ]; then
|
||||
error "please run this in a package directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" == "" ]; then
|
||||
echo "usage: apatch <patch name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
|
|
Loading…
Reference in a new issue