summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-05-02 21:45:15 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-05-02 21:45:15 -0400
commit6373878a73c0e0cb4859a8494379a88cfc6de55e (patch)
tree3d8ee5c68a25e49e9635308eaa2c5121d401dd60 /src
parent2c6e781d121b12f6d26b52ed0b2fd13551d7dba8 (diff)
librechroot: fix ${archroot_args[]}
Diffstat (limited to 'src')
-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
########################################################################