summaryrefslogtreecommitdiff
path: root/src/chroot-tools
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools')
-rwxr-xr-xsrc/chroot-tools/librechroot8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index 368ecc1..9be36ff 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -103,7 +103,7 @@ main() {
copydir="${CHROOTDIR}/${CHROOT}/${COPY}"
local mode=enter
- local archroot_args=() # not local
+ local archroot_args=()
while getopts 'n:l:NC:M:' arg; do
case $arg in
n) CHROOT=$OPTARG;;
@@ -155,7 +155,9 @@ main() {
"Waiting for existing lock on \`$copydir' to be released"
if [[ ! -d $rootdir ]]; then
- archroot "${archroot_args[@]}" -m "$rootdir"
+ set +u # if archroot_args is empty, it counts as unbound
+ archroot "${archroot_args[@]}" -m "$rootdir" base-devel
+ set -u
fi
if [[ ! -d $copydir ]] || [[ $mode == sync ]]; then
@@ -179,7 +181,9 @@ main() {
# - overwrite \`/etc/pacman.d/mirrorlist'"
# - set \`CacheDir' in \`/etc/pacman.conf'"
# - apply -C or -M flags
+ set +u # if archroot_args is empty, it counts as unbound
archroot "${archroot_args[@]}" -r "$copydir" true
+ set -u
fi
########################################################################