summaryrefslogtreecommitdiff
path: root/arch-nspawn.in
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@parabola.nu>2018-05-29 15:12:48 -0400
committerLuke Shumaker <lukeshu@parabola.nu>2018-05-29 15:12:48 -0400
commitfdf7ec7616e06870c7c30205578e98b43aa34482 (patch)
tree9a56c8795fb645bd7ac5dd502b90c047eb848522 /arch-nspawn.in
parent779a9020f1d290d8ce0517ef1e6d624b4135d01d (diff)
parentee8e2b74bbb82b11a1d14d981384151106d48eb8 (diff)
downloaddevtools32-fdf7ec7616e06870c7c30205578e98b43aa34482.tar.xz
Merge branch 'lukeshu/rebase/master'libretools-20180530
Diffstat (limited to 'arch-nspawn.in')
-rw-r--r--arch-nspawn.in3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch-nspawn.in b/arch-nspawn.in
index c448056..96b3e38 100644
--- a/arch-nspawn.in
+++ b/arch-nspawn.in
@@ -58,8 +58,9 @@ else
cache_dirs=("$cache_dir")
fi
+pacconf_cmd=$(command -v pacman-conf || command -v pacconf)
# shellcheck disable=2016
-host_mirror=$(pacman --cachedir /doesnt/exist -Sddp extra/devtools 2>/dev/null | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
+host_mirror=$($pacconf_cmd --repo extra Server 2> /dev/null | head -1 | sed -r 's#(.*/)extra/os/.*#\1$repo/os/$arch#')
# shellcheck disable=2016
[[ $host_mirror == *file://* ]] && host_mirror_path=$(echo "$host_mirror" | sed -r 's#file://(/.*)/\$repo/os/\$arch#\1#g')