summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/chroot-tools/librechroot10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/chroot-tools/librechroot b/src/chroot-tools/librechroot
index e671814..7cfe125 100755
--- a/src/chroot-tools/librechroot
+++ b/src/chroot-tools/librechroot
@@ -85,10 +85,11 @@ hack_arch_nspawn_flags() {
}
# Usage: arch-nspawn $copydir $cmd...
-arch-nspawn() (
+arch-nspawn() {
local copydir=$1; shift
local cmd=("$@")
+ local arch_nspawn_flags=(${arch_nspawn_flags+"${arch_nspawn_flags[@]}"})
hack_arch_nspawn_flags "$copydir"
"$_arch_nspawn" \
@@ -97,20 +98,21 @@ arch-nspawn() (
${sysd_nspawn_flags+"${sysd_nspawn_flags[@]}"} \
-- \
"${cmd[@]}"
-)
+}
# Usage: mkarchroot $copydir $pkgs...
-mkarchroot() (
+mkarchroot() {
local copydir=$1; shift
local pkgs=("$@")
+ local arch_nspawn_flags=(${arch_nspawn_flags+"${arch_nspawn_flags[@]}"})
hack_arch_nspawn_flags "$copydir"
unshare -m "$_mkarchroot" \
${arch_nspawn_flags+"${arch_nspawn_flags[@]}"} \
"$copydir" \
"${pkgs[@]}"
-)
+}
# Usage: _makechrootpkg $function $arguments...
# Don't load $_makechrootpkg directly because it doesn't work with -euE