Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornl6720 <nl6720@gmail.com>2021-06-05 08:23:14 +0300
committernl6720 <nl6720@gmail.com>2021-06-05 08:23:14 +0300
commit62e74c7e7954756b8653f0edb679eb970a4b49a4 (patch)
tree0cfbcb9a8e9589cc5cc40d1e746cf72d185dd41e
parenta9a4dc4f70cf9527ffab493f55be01b1d171b385 (diff)
mkarchiso: fix unbound variable when not using GPG signing
Fixes #138
-rwxr-xr-xarchiso/mkarchiso6
1 files changed, 4 insertions, 2 deletions
diff --git a/archiso/mkarchiso b/archiso/mkarchiso
index 10daa6e..685ad43 100755
--- a/archiso/mkarchiso
+++ b/archiso/mkarchiso
@@ -320,16 +320,18 @@ _make_custom_airootfs() {
# Install desired packages to airootfs
_make_packages() {
+ local envvars_in_chroot=()
_msg_info "Installing packages to '${pacstrap_dir}/'..."
if [[ -n "${gpg_key}" ]]; then
exec {ARCHISO_GNUPG_FD}<>"${work_dir}/pubkey.gpg"
+ envvars_in_chroot+=("ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}")
fi
if [[ "${quiet}" = "y" ]]; then
- env -i "ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
+ env -i "${envvars_in_chroot[@]}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}" &> /dev/null
else
- env -i "ARCHISO_GNUPG_FD=${ARCHISO_GNUPG_FD}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
+ env -i "${envvars_in_chroot[@]}" pacstrap -C "${work_dir}/${buildmode}.pacman.conf" -c -G -M -- "${pacstrap_dir}" "${buildmode_pkg_list[@]}"
fi
if [[ -n "${gpg_key}" ]]; then