1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

makepkg: abort when failing to create BUILDDIR

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2012-03-09 17:27:43 +10:00 committed by Dan McGee
parent 44de3183ff
commit 573bd80f14

View File

@ -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" ||
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