makepkg: Fix non-writable SRCPKGDEST error message

Provide a helpful error message for when creating a source tarball
and SRCPKGDEST is not writable.

Fixes FS#28197.

Signed-off-by: Allan McRae <allan@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Allan McRae 2012-01-31 23:25:19 +10:00 committed by Dan McGee
parent fcbae69fe8
commit 47313acee4
1 changed files with 5 additions and 0 deletions

View File

@ -2048,6 +2048,11 @@ fi
SRCPKGDEST=${_SRCPKGDEST:-$SRCPKGDEST}
SRCPKGDEST=${SRCPKGDEST:-$startdir} #default to $startdir if undefined
if (( SOURCEONLY )) && [[ ! -w $SRCPKGDEST ]]; then
error "$(gettext "You do not have write permission to store source tarballs in %s.")" "$SRCPKGDEST"
plain "$(gettext "Aborting...")"
exit 1
fi
PKGEXT=${_PKGEXT:-$PKGEXT}
SRCEXT=${_SRCEXT:-$SRCEXT}