diff --git a/apatch b/apatch index 08e68a2..c2b9601 100755 --- a/apatch +++ b/apatch @@ -2,8 +2,15 @@ startdir="$PWD" -[ -f APKBUILD ] || ( echo "please run this in a package directory"; exit 1 ) -[ "$1" != "" ] || ( echo "usage: apatch "; exit 1 ) +if [ ! -f APKBUILD ]; then + error "please run this in a package directory" + exit 1 +fi + +if [ "$1" == "" ]; then + echo "usage: apatch " + exit 1 +fi set -e