summaryrefslogtreecommitdiff
path: root/src/chroot-tools/libremakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/chroot-tools/libremakepkg')
-rwxr-xr-xsrc/chroot-tools/libremakepkg17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/chroot-tools/libremakepkg b/src/chroot-tools/libremakepkg
index a459009..26080bc 100755
--- a/src/chroot-tools/libremakepkg
+++ b/src/chroot-tools/libremakepkg
@@ -121,21 +121,22 @@ build() (
local copydir=$1; shift
local repack=$1; shift
- local run=()
+ local run_ynet=()
+ local run_nnet=()
if $INCHROOT; then
- run=(unshare)
- if $NONET; then run+=('-n'); fi
+ run_ynet=(unshare)
+ run_nnet=(unshare -n)
else
- run=(librechroot "${librechroot_flags[@]}")
- if $NONET; then run+=('-N'); fi
- run+=(run)
+ run_ynet=(librechroot "${librechroot_flags[@]}" run)
+ run_nnet=(librechroot "${librechroot_flags[@]}" -N run)
fi
+ $NONET || run_nnet=("${run_ynet[@]}")
prepare_chroot "$copydir" "$LIBREHOME" "$repack" false
- "${run[@]}" /chrootprepare "$@" |& indent
+ "${run_ynet[@]}" /chrootprepare false "$@" |& indent
run_hook pre_build "$copydir"
trap "run_hook post_build '$copydir'" EXIT
- "${run[@]}" /chrootbuild "$@" |& indent
+ "${run_nnet[@]}" /chrootbuild false "$@" |& indent
)
# The main program #############################################################