summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-03-18 14:24:12 +0100
committerErich Eckner <git@eckner.net>2021-03-18 14:24:12 +0100
commitbc3ce2656a0246cf5106643eb2665e466e1aefd3 (patch)
treedf288413f5588f1251a98af5492366993c94bd06
parent823320c3c4fb32c1e302423ae296547e25665668 (diff)
downloadbuild-knecht-bc3ce2656a0246cf5106643eb2665e466e1aefd3.tar.xz
build-knecht: use pacman-conf instead of mangling uname output
-rwxr-xr-xbuild-knecht13
1 files changed, 7 insertions, 6 deletions
diff --git a/build-knecht b/build-knecht
index 508f614..cdbffc3 100755
--- a/build-knecht
+++ b/build-knecht
@@ -10,12 +10,13 @@ if [ -z "${home_dir}" ]; then
exit 1
fi
-arch=$(
- uname -m \
- | sed '
- s/^\(armv[67]\)l$/\1h/
- '
-)
+if [ -n "$1" ]; then
+ arch="$1"
+else
+ arch=$(
+ pacman-conf Architecture
+ )
+fi
if ! git -C "${home_dir}/archlinuxewe" pull --ff-only; then
>&2 echo 'Cannot update archPackages repository.'