summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoe Carstairs <me@joeac.net>2026-06-29 09:28:53 +0100
committerJoe Carstairs <me@joeac.net>2026-06-29 09:28:53 +0100
commit70a155a0a763b52417d827baa3dbe1dc88bab975 (patch)
tree53b5c530e43c01856ea692ea4a94ee52f43fa8e2 /Makefile
parent673aaf1c13cfdbec74f99d771ad1d5398dc4613f (diff)
Makefile: CPU_ARCH can use arch instead of lscpu to find CPU architecture
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 3 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 947cd8e..7fdc364 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,9 @@ include config.mk
# VARIABLES #
#############
-CPU_ARCH := $(shell lscpu | grep ^Architecture: | sed "s/^Architecture:[[:space:]]*\([[:alnum:][:punct:]]\+\).*/\1/")
+CPU_ARCH := $(if $(shell which arch),\
+ $(shell arch),\
+ $(shell lscpu | grep ^Architecture: | sed "s/^Architecture:[[:space:]]*\([[:alnum:][:punct:]]\+\).*/\1/"))
IMAGE_PREFIX := $(if $(filter armv7%,$(CPU_ARCH)),armv7/)
REGISTRY_DOMAIN := git.joeac.net
REGISTRY_USER := joeac