diff options
author | Allan McRae <allan@archlinux.org> | 2012-03-09 08:27:43 +0100 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2012-03-16 18:01:26 +0100 |
commit | 573bd80f147ce90f21ef51fb8ca6f71e89cc3a74 (patch) | |
tree | f8e9d2d657cafb1462c511f6d02cbffa2ec0a900 /scripts/makepkg.sh.in | |
parent | 44de3183ff42dc4e5972a9d563ebc7125c3eb4dd (diff) | |
download | pacman-573bd80f147ce90f21ef51fb8ca6f71e89cc3a74.tar.gz pacman-573bd80f147ce90f21ef51fb8ca6f71e89cc3a74.tar.xz |
makepkg: abort when failing to create BUILDDIR
Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | scripts/makepkg.sh.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 2386a688..0ec5ae1f 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -2052,8 +2052,11 @@ readonly ALL_OFF BOLD BLUE GREEN RED YELLOW BUILDDIR=${_BUILDDIR:-$BUILDDIR} BUILDDIR=${BUILDDIR:-$startdir} #default to $startdir if undefined if [[ ! -d $BUILDDIR ]]; then - mkdir -p "$BUILDDIR" || - error "$(gettext "You do not have write permission to create packages in %s.")" "$BUILDDIR" + if ! mkdir -p "$BUILDDIR"; then + error "$(gettext "You do not have write permission to create packages in %s.")" "$BUILDDIR" + plain "$(gettext "Aborting...")" + exit 1 + fi chmod a-s "$BUILDDIR" fi if [[ ! -w $BUILDDIR ]]; then |