summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbill-auger <mr.j.spam.me@gmail.com>2022-07-30 15:37:04 -0400
committerbill-auger <mr.j.spam.me@gmail.com>2024-01-01 17:42:22 -0500
commitcef5c691e9b9e3ad99a80fa697f6f5c89f8673db (patch)
tree7d62c1b1d7a1bf995dc30d347638a9499a9a9e23
parent36446de4787b8e617a514cc554ffd7e45548aa86 (diff)
add sanity check for $PACKAGER
-rwxr-xr-xsrc/chroot-tools/libremakepkg9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index a3c784b..2623316 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -260,13 +260,20 @@ main() {
MAKEFLAGS="$(get_var makepkg MAKEFLAGS '')"
PACKAGER="$(get_var makepkg PACKAGER '')"
- # Quick sanity check ###################################################
+ # Quick sanity checks ##################################################
if (( EUID )); then
error "This program must be run as root"
exit $EXIT_NOPERMISSION
fi
+ if [[ -z $PACKAGER ]]; then
+ error "\$PACKAGER is not set."
+ plain "Set it in ~/.config/pacman/makepkg.conf - eg:"
+ plain "PACKAGER='Package Monkey Jr. <freesoftwarerocks@parabola.nu>'"
+ exit $EXIT_NOTCONFIGURED
+ fi
+
if [[ -n $srcpkg ]]; then
if [[ ! -f $srcpkg ]]; then
error 'Source package does not exist: %s' "$srcpkg"