diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2022-07-30 15:37:04 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2022-08-29 10:31:20 -0400 |
commit | 5e97fef4289afb7b9566b957a1e6591927b7310c (patch) | |
tree | c4abf435ff662b42ba6881815b665026b40e923e | |
parent | 1fdf266c535a8176155bf2f4c8f3c11df2307e13 (diff) |
add sanity check for $PACKAGER
-rwxr-xr-x | src/chroot-tools/libremakepkg | 9 |
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" |