Skip to content

Commit 6f18989

Browse files
author
Paul Dagnelie
authored
TOOL-15609 Tweak linux-pkg to support ARM builds (#250)
1 parent 7fe9cd2 commit 6f18989

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

lib/common.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,16 @@ function list_linux_kernel_packages() {
575575

576576
function install_shfmt() {
577577
if [[ ! -f /usr/local/bin/shfmt ]]; then
578+
local arch
579+
arch=$(dpkg-architecture -q DEB_HOST_ARCH)
580+
581+
# The release names for shfmt don't use the actual
582+
# architecture strings, unfortunately.
583+
if [[ "$arch" == "arm64" ]]; then
584+
arch="arm"
585+
fi
578586
logmust sudo wget -nv -O /usr/local/bin/shfmt \
579-
https://github.com/mvdan/sh/releases/download/v2.4.0/shfmt_v2.4.0_linux_amd64
587+
https://github.com/mvdan/sh/releases/download/v2.4.0/shfmt_v2.4.0_linux_$arch
580588
logmust sudo chmod +x /usr/local/bin/shfmt
581589
fi
582590
echo "shfmt version $(shfmt -version) is installed."

packages/challenge-response/config.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ function prepare() {
2828
function build() {
2929
logmust cd "$WORKDIR/repo/challenge_response"
3030
logmust make package
31-
logmust mv ./x86_64/*deb "$WORKDIR/artifacts/"
31+
logmust mv "./$(dpkg-architecture -q DEB_HOST_GNU_CPU)"/*deb "$WORKDIR/artifacts/"
3232
}

0 commit comments

Comments
 (0)