Skip to content

Commit

Permalink
chore:adding check for arch for linux installer
Browse files Browse the repository at this point in the history
  • Loading branch information
charlypa committed May 28, 2024
1 parent 107b2ff commit 0f99b0a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/linux/installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ check_ubuntu_version() {
fi
return 1 # Not Ubuntu 24.04
}

# Create Invocation Script Function
#
# Purpose:
Expand Down Expand Up @@ -607,6 +608,20 @@ downloadLatestReleaseInfo() {
grep -Po '"tag_name":\s*"prod-app-v\K[\d.]+(?=")' "$release_info_file"
}

# Function to check if the architecture is 64-bit x86
check_architecture() {
ARCHITECTURE=$(uname -m)
if [ "$ARCHITECTURE" != "x86_64" ]; then
local latestFileUrl
latestFileUrl=$(grep -oP 'https://[^"]*latest\.json' "$TMP_DIR/latest_release.json")
WGET_OPTS=$(configure_wget_options)
wget $WGET_OPTS "$TMP_DIR/latest.json" "$latestFileUrl" || {
echo -e "${RED}Failed to download the latestFile. Please check your internet connection and try again.${RESET}"
}
echo -e "${RED}This script can only be run on 64-bit x86 architecture.${RESET}"
exit 1
fi
}
# Download Latest Release Information Function
#
# Purpose:
Expand Down Expand Up @@ -649,6 +664,7 @@ downloadLatestReleaseInfo() {
downloadAndInstall(){
echo "Using temporary directory $TMP_DIR for processing"
downloadLatestReleaseInfo > /dev/null
check_architecture
CURRENT_GLIBC_VERSION=$(ldd --version | grep "ldd" | awk '{print $NF}')
echo "Current GLIBC version: $CURRENT_GLIBC_VERSION"

Expand Down

0 comments on commit 0f99b0a

Please sign in to comment.