index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2019-04-01 10:38:05 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-06-16 14:11:01 +0200 |
commit | bd53fd6e9a8fb3dadfdf325b24f22aaa00bb1337 (patch) | |
tree | c77dd0145d8c20cd6c73aac30a4da2b754ab9672 /arch-nspawn.in | |
parent | f522ce2277100a147baa2656753231b14cf1f71d (diff) |
-rw-r--r-- | arch-nspawn.in | 7 |
diff --git a/arch-nspawn.in b/arch-nspawn.in index e68e2e7..cebeb2e 100644 --- a/arch-nspawn.in +++ b/arch-nspawn.in @@ -52,16 +52,17 @@ shift 1 [[ -z $working_dir ]] && die 'Please specify a working directory.' +[[ -z $pac_conf ]] && pac_conf="$working_dir/etc/pacman.conf" + if [[ -z $cache_dir ]]; then - cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) + cache_dirs=($(pacman --config "$pac_conf" -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g')) else cache_dirs=("$cache_dir") fi pacconf_cmd=$(command -v pacman-conf || command -v pacconf) # shellcheck disable=2016 -host_mirrors=($($pacconf_cmd --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')) -# shellcheck disable=2016 +host_mirrors=($($pacconf_cmd --conf "$pac_conf" --repo extra Server 2> /dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')) # {{{ functions build_mount_args() { |