From 15a4ae46a29612513eda53909536b81bcec44859 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 19 Feb 2020 09:38:37 +0100 Subject: allow PKGEXT to be set from the environment --- archbuild.in | 2 +- makechrootpkg.in | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/archbuild.in b/archbuild.in index 5b98976..32f0d03 100644 --- a/archbuild.in +++ b/archbuild.in @@ -48,7 +48,7 @@ while getopts 'hcr:' arg; do esac done -check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME +check_root SOURCE_DATE_EPOCH,SRCDEST,SRCPKGDEST,PKGDEST,LOGDEST,MAKEFLAGS,PACKAGER,GNUPGHOME,PKGEXT # Pass all arguments after -- right to makepkg makechrootpkg_args+=("${@:$OPTIND}") diff --git a/makechrootpkg.in b/makechrootpkg.in index d308af2..10bf8b7 100644 --- a/makechrootpkg.in +++ b/makechrootpkg.in @@ -178,6 +178,9 @@ prepare_chroot() { grep -q "^$x" "$copydir/etc/makepkg.conf" && continue echo "$x" >>"$copydir/etc/makepkg.conf" done + if [ -n "${PKGEXT}" ]; then + sed -i 's/^PKGEXT=.*/PKGEXT='"'${PKGEXT}'"'/' "$copydir/etc/makepkg.conf" + fi cat > "$copydir/etc/sudoers.d/builduser-pacman" <