From a5d14f01e2d29269cbc98ed5716a860f2cf38313 Mon Sep 17 00:00:00 2001 From: subash Date: Wed, 21 Dec 2022 08:51:12 +1100 Subject: [PATCH] fix command hook --- hooks/command | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hooks/command b/hooks/command index 18a10a1..a798f8e 100755 --- a/hooks/command +++ b/hooks/command @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash set -euo pipefail check_cmd() { @@ -20,7 +20,8 @@ err() { } get_architecture() { - local _arch="$(arch)" + local _ostype="$(uname -s)" + local _arch="$(uname -m)" local _arm=("arm armhf aarch64 aarch64_be armv6l armv7l armv8l arm64e") # arm64 local _amd=("x86 x86pc i386 i686 i686-64 x64 x86_64 x86_64h athlon") # amd64 @@ -33,7 +34,7 @@ get_architecture() { exit 2 fi - RETVAL="$_arch" + RETVAL="${_ostype}_${_arch}" } need_cmd() {