diff --git a/scripts/install_software.sh b/scripts/install_software.sh index aff181a..62e3f53 100755 --- a/scripts/install_software.sh +++ b/scripts/install_software.sh @@ -1,5 +1,5 @@ #!/bin/bash - +ARCH="$(uname -m | sed -e 's/x86_64/amd64/' -e 's/\(arm\)\(64\)\?.*/\1\2/' -e 's/aarch64$/arm64/')" ############################################################################### # # This is a simple script to install yugabyte-db software on a machine. @@ -8,12 +8,17 @@ YB_VERSION=$1 # this query is paginated, so there's no guarantee we will find this release on the first page # needs improvement to walk through all pages -YB_RELEASE=$(curl -s https://registry.hub.docker.com/v2/repositories/yugabytedb/yugabyte/tags | grep -Eo "${YB_VERSION}-b[0-9]+") +YB_RELEASE=$(curl -s https://registry.hub.docker.com/v2/repositories/yugabytedb/yugabyte/tags?page_size=300 | grep -Eo "${YB_VERSION}-b[0-9]+") YB_HOME=/home/${USER}/yugabyte-db YB_DL_BASE="https://downloads.yugabyte.com/releases" YB_PACKAGE_URL="${YB_DL_BASE}/${YB_VERSION}/yugabyte-${YB_RELEASE}-linux-x86_64.tar.gz" +if [[ $ARCH == "arm64" ]]; then + YB_PACKAGE_URL="${YB_DL_BASE}/${YB_VERSION}/yugabyte-${YB_RELEASE}-el8-aarch64.tar.gz" +fi YB_PACKAGE_NAME="${YB_PACKAGE_URL##*/}" + + ############################################################################### # Create the necessary directories. ###############################################################################