From 1af5b6c964a1e37b7f2352c725f30da3d72fe741 Mon Sep 17 00:00:00 2001 From: Naoya Yamashita Date: Tue, 26 Oct 2021 02:21:23 +0900 Subject: [PATCH] use `uname -m` instead of `arch` comamnd `arch` command is not installed at default. see coreutils document: > arch is not installed by default, so portable scripts should > not rely on its existence. https://www.gnu.org/software/coreutils/manual/html_node/arch-invocation.html ref: https://github.com/google/fscrypt/issues/92#issuecomment-365712796 --- etc/scripts/get-stack.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/scripts/get-stack.sh b/etc/scripts/get-stack.sh index 1923cca2ad..0291913d35 100755 --- a/etc/scripts/get-stack.sh +++ b/etc/scripts/get-stack.sh @@ -71,9 +71,9 @@ post_install_separator() { # determines the the CPU's instruction set get_isa() { - if arch | grep -Eq 'armv[78]l?' ; then + if uname -m | grep -Eq 'armv[78]l?' ; then echo arm - elif arch | grep -q aarch64 ; then + elif uname -m | grep -q aarch64 ; then echo aarch64 else echo x86