diff options
| author | Richard Mortier <mort@cantab.net> | 2019-05-01 10:34:24 +0100 |
|---|---|---|
| committer | Richard Mortier <mort@cantab.net> | 2019-05-01 10:39:00 +0100 |
| commit | 6794fcbad2ec6666b3face12d24eafd7d36029bf (patch) | |
| tree | ef93a3b5d15c16525188f67c3877bc456507d29a | |
| parent | fcadb0a44470c96830a42f4b56100f27c2b8fe9b (diff) | |
| download | docker-abuild-6794fcbad2ec6666b3face12d24eafd7d36029bf.tar.bz2 docker-abuild-6794fcbad2ec6666b3face12d24eafd7d36029bf.tar.xz | |
dabuild: nicer error handling
| -rwxr-xr-x | dabuild.in | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -5,6 +5,11 @@ set -e +die () { + printf "%s\n" "$*" >&2 + exit 1 +} + ## debug if [ "$DABUILD_DEBUG" = "true" ]; then set -x @@ -13,8 +18,8 @@ fi ## check running from within an `aports` tree if [ "${PWD%*/aports*}" = "$PWD" ]; then - echo "Error: expecting to be run from within an aports tree!" - echo "Could not find '/aports' in the current path ($PWD)" + die "Error: expecting to be run from within an aports tree!" \ + "Could not find '/aports' in the current path ($PWD)" exit 1 fi |
