Skip to content

Commit 0f99b0a

Browse files
committed
chore:adding check for arch for linux installer
1 parent 107b2ff commit 0f99b0a

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/linux/installer.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ check_ubuntu_version() {
124124
fi
125125
return 1 # Not Ubuntu 24.04
126126
}
127+
127128
# Create Invocation Script Function
128129
#
129130
# Purpose:
@@ -607,6 +608,20 @@ downloadLatestReleaseInfo() {
607608
grep -Po '"tag_name":\s*"prod-app-v\K[\d.]+(?=")' "$release_info_file"
608609
}
609610

611+
# Function to check if the architecture is 64-bit x86
612+
check_architecture() {
613+
ARCHITECTURE=$(uname -m)
614+
if [ "$ARCHITECTURE" != "x86_64" ]; then
615+
local latestFileUrl
616+
latestFileUrl=$(grep -oP 'https://[^"]*latest\.json' "$TMP_DIR/latest_release.json")
617+
WGET_OPTS=$(configure_wget_options)
618+
wget $WGET_OPTS "$TMP_DIR/latest.json" "$latestFileUrl" || {
619+
echo -e "${RED}Failed to download the latestFile. Please check your internet connection and try again.${RESET}"
620+
}
621+
echo -e "${RED}This script can only be run on 64-bit x86 architecture.${RESET}"
622+
exit 1
623+
fi
624+
}
610625
# Download Latest Release Information Function
611626
#
612627
# Purpose:
@@ -649,6 +664,7 @@ downloadLatestReleaseInfo() {
649664
downloadAndInstall(){
650665
echo "Using temporary directory $TMP_DIR for processing"
651666
downloadLatestReleaseInfo > /dev/null
667+
check_architecture
652668
CURRENT_GLIBC_VERSION=$(ldd --version | grep "ldd" | awk '{print $NF}')
653669
echo "Current GLIBC version: $CURRENT_GLIBC_VERSION"
654670

0 commit comments

Comments
 (0)