Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore:adding check for arch for linux installer #419

Merged
merged 1 commit into from
May 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading