1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-08-13 17:03:46 -04: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:-$BUILDDIR}
BUILDDIR=${BUILDDIR:-$startdir} #default to $startdir if undefined BUILDDIR=${BUILDDIR:-$startdir} #default to $startdir if undefined
if [[ ! -d $BUILDDIR ]]; then 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" error "$(gettext "You do not have write permission to create packages in %s.")" "$BUILDDIR"
plain "$(gettext "Aborting...")"
exit 1
fi
chmod a-s "$BUILDDIR" chmod a-s "$BUILDDIR"
fi fi
if [[ ! -w $BUILDDIR ]]; then if [[ ! -w $BUILDDIR ]]; then