From 78515c2d7c700a81da546114cc5fda60df78e9af Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 20 Feb 2026 11:26:30 +0100 Subject: [PATCH] Update function changed --- helium_helper.sh | 8 +++++--- helium_launcher_update.sh | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 8afc2fc..fc96465 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -302,11 +302,13 @@ update_application() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) APP_SOURCE_VERSION_NUM=$(echo $APP_SOURCE_VERSION | tr -d .) + APP_SOURCE_VERSION_NUM=$(echo "1.$APP_SOURCE_VERSION_NUM") + LOCAL_VERSION_NUM=$(echo "1.$LOCAL_VERSION_NUM") if [ "$APP_SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then echo -e "\n ${GRN}$APP_NAME_LONG is already up-to-date!${CRS}\n" - elif [ "$APP_SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ $(echo "$APP_SOURCE_VERSION_NUM > $LOCAL_VERSION_NUM" | bc -l) -eq 1 ] ; then echo -e "\n ${LCY}$APP_NAME_LONG is updatable!${CRS}\n" app_version_info @@ -917,14 +919,14 @@ compare_version() { help() { echo -e "\n${LCY}${SCRIPT_NAME}${CRS}\n" echo -e "$APP_NAME_LONG installer & updater script\n" - echo -e "Syntax: $SCRIPT_FILE_NAME [ -i | -l | -a | -u | -b | -B | -r | -c | -s | -S | -h ]\n" + echo -e "Syntax: $SCRIPT_FILE_NAME [ -i | -l | -a | -u | -b | -r | -c | -s | -S | -h ]\n" echo -e "Options:\n" echo -e "\t-i\tInstall $APP_NAME_LONG from $APP_SOURCE" echo -e "\t-l\tCreate desktop launcher" echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME" echo -e "\t-u\tUpdate $APP_NAME_LONG from $APP_SOURCE" echo -e "\t-b\tBackup $APP_NAME_LONG & configuration" - echo -e "\t-B\tRestore $APP_NAME_LONG & configuration from backup" + #echo -e "\t-B\tRestore $APP_NAME_LONG & configuration from backup" echo -e "\t-r\tRemove $APP_NAME_LONG" echo -e "\t-c\tCompare local to remote version" echo -e "\t-s\tShow script version" diff --git a/helium_launcher_update.sh b/helium_launcher_update.sh index 0f2d1c2..06a12cf 100755 --- a/helium_launcher_update.sh +++ b/helium_launcher_update.sh @@ -254,11 +254,13 @@ update_helium() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) APP_SOURCE_VERSION_NUM=$(echo $APP_SOURCE_VERSION | tr -d .) + APP_SOURCE_VERSION_NUM=$(echo "1.$APP_SOURCE_VERSION_NUM") + LOCAL_VERSION_NUM=$(echo "1.$LOCAL_VERSION_NUM") if [ "$APP_SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then notify-send --icon="$ICON" "$NOTIFY_NAME" "Browser is up-to-date" - elif [ "$APP_SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ $(echo "$APP_SOURCE_VERSION_NUM > $LOCAL_VERSION_NUM" | bc -l) -eq 1 ] ; then mkdir -p $TMP wget -P $TMP $DOWNLOAD_URL -q chmod +x $TMP/$APP_SOURCE_FILENAME