@@ -86,6 +86,23 @@ trap cleanup EXIT # Register the cleanup function to be called on script exit.
8686
8787TMP_DIR=$( mktemp -d)
8888
89+ check_ubuntu_version () {
90+ if [ -f /etc/os-release ]; then
91+ . /etc/os-release
92+ if [[ " $ID " = " ubuntu" && " $VERSION_ID " = " 24.04" ]]; then
93+ local latestFileUrl
94+ latestFileUrl=$( grep -oP ' https://[^"]*latest\.json' " $TMP_DIR /latest_release.json" )
95+ WGET_OPTS=$( configure_wget_options)
96+
97+ wget $WGET_OPTS " $TMP_DIR /latest.json" " $latestFileUrl " || {
98+ echo -e " ${RED} Failed to download the latestFile. Please check your internet connection and try again.${RESET} "
99+ }
100+ echo -e " ${RED} Ubuntu 24.04 LTS is not currently supported by this installation script.${RESET} "
101+ echo -e " ${YELLOW} Please use an earlier version of Ubuntu for the time being. Check back later for updates.${RESET} "
102+ exit 1
103+ fi
104+ fi
105+ }
89106# Create Invocation Script Function
90107#
91108# Purpose:
@@ -267,6 +284,8 @@ verify_and_install_dependencies() {
267284 echo " Application launch verification successful."
268285 return 0 # Exit the function successfully if verification succeeds
269286 else
287+ # Check Ubuntu version for compatibility
288+ check_ubuntu_version
270289 echo " Initial verification failed. Attempting to install dependencies..."
271290 install_dependencies # Function to install required dependencies
272291 fi
@@ -470,22 +489,6 @@ downloadLatestReleaseInfo() {
470489downloadAndInstall (){
471490 echo " Using temporary directory $TMP_DIR for processing"
472491 downloadLatestReleaseInfo > /dev/null
473- # Check Ubuntu version for compatibility
474- if [ -f /etc/os-release ]; then
475- . /etc/os-release
476- if [[ " $ID " = " ubuntu" && " $VERSION_ID " = " 24.04" ]]; then
477- local latestFileUrl
478- latestFileUrl=$( grep -oP ' https://[^"]*latest\.json' " $TMP_DIR /latest_release.json" )
479- WGET_OPTS=$( configure_wget_options)
480-
481- wget $WGET_OPTS " $TMP_DIR /latest.json" " $latestFileUrl " || {
482- echo -e " ${RED} Failed to download the latestFile. Please check your internet connection and try again.${RESET} "
483- }
484- echo -e " ${RED} Ubuntu 24.04 LTS is not currently supported by this installation script.${RESET} "
485- echo -e " ${YELLOW} Please use an earlier version of Ubuntu for the time being. Check back later for updates.${RESET} "
486- exit 1
487- fi
488- fi
489492 CURRENT_GLIBC_VERSION=$( ldd --version | grep " ldd" | awk ' {print $NF}' )
490493 echo " Current GLIBC version: $CURRENT_GLIBC_VERSION "
491494
0 commit comments