From e0af88ed9664862aff1b1574cbd7195bc2a626c6 Mon Sep 17 00:00:00 2001 From: Spencer Wilson Date: Thu, 25 Jul 2024 11:26:41 -0400 Subject: [PATCH] Handle arm64 Signed-off-by: Spencer Wilson --- scripts/format_code.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/format_code.sh b/scripts/format_code.sh index 4cce811cc..ab0bdc453 100755 --- a/scripts/format_code.sh +++ b/scripts/format_code.sh @@ -2,10 +2,18 @@ # SPDX-License-Identifier: MIT +arch=$(uname -m) + +if [ "$arch" != "x86_64" ] && [ "$arch" != "arm64" ] +then + echo "This script does not currently support systems where \`uname -m\` returns $arch." + exit 1 +fi + if [ ! -d "$LIBOQS_DIR" ] then - echo Must set environment variable LIBOQS_DIR + echo Please set the environment variable LIBOQS_DIR to point to your liboqs directory. exit 1 fi -docker run --rm -v"$LIBOQS_DIR":/root/liboqs -w /root/liboqs openquantumsafe/ci-ubuntu-focal-x86_64:latest ./tests/run_astyle.sh --no-dry-run +docker run --rm -v"$LIBOQS_DIR":/root/liboqs -w /root/liboqs openquantumsafe/ci-ubuntu-focal-$arch:latest ./tests/run_astyle.sh --no-dry-run