From 6373878a73c0e0cb4859a8494379a88cfc6de55e Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Thu, 2 May 2013 21:45:15 -0400 Subject: librechroot: fix ${archroot_args[]} --- src/chroot-tools/librechroot | 8 ++++++-- 1 file 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 ######################################################################## -- cgit v1.2.2