summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-03-09 08:27:43 +0100
committerDan McGee <dan@archlinux.org>2012-03-16 18:01:26 +0100
commit573bd80f147ce90f21ef51fb8ca6f71e89cc3a74 (patch)
treef8e9d2d657cafb1462c511f6d02cbffa2ec0a900 /scripts
parent44de3183ff42dc4e5972a9d563ebc7125c3eb4dd (diff)
downloadpacman-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')
-rw-r--r--scripts/makepkg.sh.in7
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