diff --git a/test/services/nginx/install_tools.sh b/test/services/nginx/install_tools.sh index f33aef62..9b0b6bd5 100755 --- a/test/services/nginx/install_tools.sh +++ b/test/services/nginx/install_tools.sh @@ -2,6 +2,20 @@ set -e +get_architecture() { + case "$(uname -m)" in + aarch64|arm64) + echo "arm64" + ;; + x86_64|amd64) + echo "amd64" + ;; + *) + echo "" + ;; + esac +} + install_nginx_on_amazon_linux() { # Older versions of Amazon Linux needed "amazon-linux-extras" in order to # install nginx. Newer versions of Amazon Linux don't have @@ -25,10 +39,13 @@ if command -v apt-get >/dev/null 2>&1; then if grep ^11\. /etc/debian_version; then # the version of gdb is too old and can't handle dwarf data generated by clang 16 - apt-get install -y wget - wget -O /tmp/gdb.deb https://sqreen-ci-java.s3.amazonaws.com/deb-ad-hoc/bullseye/gdb_15.1-1_amd64.deb - dpkg -i /tmp/gdb.deb - rm /tmp/gdb.deb + ARCH="$(get_architecture)" + if [ "$ARCH" = "amd64" ]; then + apt-get install -y wget + wget -O /tmp/gdb.deb https://sqreen-ci-java.s3.amazonaws.com/deb-ad-hoc/bullseye/gdb_15.1-1_amd64.deb + dpkg -i /tmp/gdb.deb + rm /tmp/gdb.deb + fi fi elif command -v apk >/dev/null 2>&1; then apk update