index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Luke Shumaker <lukeshu@parabola.nu> | 2017-02-15 14:39:25 -0500 |
---|---|---|
committer | Luke Shumaker <lukeshu@parabola.nu> | 2017-04-05 14:42:43 -0400 |
commit | b2c6c98a394a92cff5d08418e98d9e0d2880ec63 (patch) | |
tree | a2e07f057a390da25b2c72ff5b7faf03d411be9e /arch-nspawn.in | |
parent | ccb26ff1435a79f13bbed6a0f46d985138eedb75 (diff) |
-rw-r--r-- | arch-nspawn.in | 6 |
diff --git a/arch-nspawn.in b/arch-nspawn.in index dceb3ed..08ed2fa 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -26,16 +26,18 @@ usage() { echo ' -M <file> Location of a makepkg config file' echo ' -c <dir> Set pacman cache' echo ' -f <file> Copy file from the host to the chroot' + echo ' -s Do not run setarch' echo ' -h This message' exit 1 } -while getopts 'hC:M:c:f:' arg; do +while getopts 'hC:M:c:f:s' arg; do case "$arg" in C) pac_conf="$OPTARG" ;; M) makepkg_conf="$OPTARG" ;; c) cache_dir="$OPTARG" ;; f) files+=("$OPTARG") ;; + s) nosetarch=1 ;; h|?) usage ;; *) error "invalid argument '%s'" "$arg"; usage ;; esac @@ -105,6 +107,8 @@ copy_hostconf eval $(grep '^CARCH=' "$working_dir/etc/makepkg.conf") +[[ -z $nosetarch ]] || unset CARCH + exec ${CARCH:+setarch "$CARCH"} systemd-nspawn -q \ -D "$working_dir" \ --register=no \ |