From 529a81492f18dbc7e84e4650f2db35177ef5a7dd Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Mon, 22 Dec 2025 19:00:24 +0100 Subject: [PATCH 01/63] To Do recovered --- todo.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 todo.md diff --git a/todo.md b/todo.md new file mode 100644 index 0000000..a4fb1dc --- /dev/null +++ b/todo.md @@ -0,0 +1,69 @@ +# To Do List Helium installer + +## Last Jobs +- Improved Version comparasing +- Clean up function added +- Remover function added +- Dummy functions added for: + - Auto Update + - Script update +- Dependency check fixed +- Launcher function works +- Remover extended +- Readme updated + + +## Add +- Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) +- Desktop entry updater [Helper Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_helper.sh) & [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) +- Auto update setup + - shell recognition +- Script updater +- Architecture detection +- Uninstaller --> Partially done +- Set alias + +## Repo +- Merge workflow + - Convert URLs from __main__ to __stable__ + - Remove to do list + - Remove comment from script + +## Fix + +## Notes + +```sh +############# TO DO + while true ; do + read -p " Enable automatic update check on login? (y/N) : " AUTO_UPDATE + + if [[ "$AUTO_UPDATE" == "" || "$AUTO_UPDATE" == "n" || "$AUTO_UPDATE" == "N" ]] ; then + break + + elif [[ "$AUTO_UPDATE" == "y" || "$AUTO_UPDATE" == "Y" ]] ; then + if ! [ -f "$PROFILE" ] ; then + echo -e "\n ${RED}Following file is missing :\n\n${YEL}$PROFILE\n\n ${CYN}Please investigate and re-run script !${CRS}" + exit 1 + + else + wget -P $TMP https://lab.c95.org/fr4nz/shell-scripts/src/branch/main/helium-browser/helium_auto_update.sh -q --show-progress + chmod +x $TMP/helium_auto_update.sh + mv $TMP/helium_auto_update.sh $INSTALL_PATH/helium_auto_update.sh + echo >> $PROFILE + echo "### HELIUM AUTO UPDATE ###" >> $PROFILE + echo "${INSTALL_PATH}/helium_auto_update.sh" >> $PROFILE + echo >> $PROFILE + echo -e "\n ${GRN}Automatic updates enabled ! ${CRS}\n" + break + + fi + + else + echo -e " ${YEL}Invalid response !${CRS}\n" + + fi + + done +############# +``` \ No newline at end of file From 7717c5932ccfe71479344fd657f6993ab20236a5 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Mon, 22 Dec 2025 19:37:03 +0100 Subject: [PATCH 02/63] Post merge changes --- helium_helper.sh | 4 ++-- todo.md | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 8eaaa59..70ea66a 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -343,11 +343,11 @@ help() { echo -e "\t-i\tDownload & install $APP_NAME_LONG from $SOURCE" echo -e "\t-L\tCreate desktop launcher" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" - #echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" + echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" echo -e "\t-c\tCompare local to remote version" echo -e "\t-s\tShow script version" - #echo -e "\t-S\tUpdate script ${RED}--> Not yet working${CRS}" + echo -e "\t-S\tUpdate script ${RED}--> Not yet working${CRS}" echo -e "\t-h\tPrint this help page.\n" echo -e "Configured locations:\n" echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location" diff --git a/todo.md b/todo.md index a4fb1dc..ddb71a1 100644 --- a/todo.md +++ b/todo.md @@ -1,15 +1,6 @@ # To Do List Helium installer ## Last Jobs -- Improved Version comparasing -- Clean up function added -- Remover function added -- Dummy functions added for: - - Auto Update - - Script update -- Dependency check fixed -- Launcher function works -- Remover extended - Readme updated @@ -20,7 +11,6 @@ - shell recognition - Script updater - Architecture detection -- Uninstaller --> Partially done - Set alias ## Repo From ebb5c25de6dd091ebebfa79b208860594130533b Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Tue, 23 Dec 2025 00:15:24 +0100 Subject: [PATCH 03/63] to do updated --- helium_helper.sh | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 70ea66a..1698998 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -135,8 +135,7 @@ add_launcher() { sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template mkdir -p $LAUNCHER_PATH $BACKUP_PATH $CONFIG_PATH/icon - cp $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop - mv $TMP/helium.desktop.template $BACKUP_PATH/$APP_NAME.desktop.backup + mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}\n" exit_clean @@ -184,7 +183,7 @@ update_helium() { echo -e "\n ${GRN}$APP_NAME_LONG is already up-to-date!${CRS}\n" elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then - echo -e "\n ${RED}$APP_NAME_LONG is updatable!${CRS}\n" + echo -e "\n ${LCY}$APP_NAME_LONG is updatable!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n" @@ -195,14 +194,17 @@ update_helium() { if [[ "$CONFIRM" == "" || "$CONFIRM" == "y" || "$CONFIRM" == "Y" ]] ; then GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') - mkdir -p $TMP + mkdir -p $TMP $BACKUP_PATH wget -P $TMP $GIT_URL -q --show-progress chmod +x $TMP/$GIT_FILENAME - if [ -f "$INSTALL_PATH/$APP_NAME.old" ] ; then - rm $INSTALL_PATH/$APP_NAME.old + if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then + rm $BACKUP_PATH/$APP_NAME.old fi - mv $INSTALL_PATH/$APP_NAME.AppImage $INSTALL_PATH/$APP_NAME.old + mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old +################ HELP ################ + sed -i "s|X-AppImage-Version=.|X-AppImage-Version=$LOCAL_VERSION|" $LAUNCHER_PATH/$APP_NAME.desktop echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date !${CRS}\n" break @@ -432,7 +434,7 @@ while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do exit;; *) - echo -e "\n${YEL}Option ${RED}-t${YEL} not recognized... Refer to help below!${CRS}" + echo -e "\n${YEL}Option ${RED}$1${YEL} not recognized... Refer to help below!${CRS}" help exit;; From 46b534fa480e13b3aea079e3473e09e76a93ca4c Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Tue, 23 Dec 2025 00:15:33 +0100 Subject: [PATCH 04/63] to do updated --- todo.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/todo.md b/todo.md index ddb71a1..8343156 100644 --- a/todo.md +++ b/todo.md @@ -2,11 +2,12 @@ ## Last Jobs - Readme updated - +- Desktop Entry updater +- Launcher has an update option now ## Add - Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) -- Desktop entry updater [Helper Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_helper.sh) & [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) +- Desktop entry updater [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) - Auto update setup - shell recognition - Script updater @@ -20,6 +21,7 @@ - Remove comment from script ## Fix +- sed commad at launcher backup ## Notes From a36f13a742fda4fa4bbff7f93a3efc6d512ccd03 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Tue, 23 Dec 2025 00:54:23 +0100 Subject: [PATCH 05/63] Launcher updater added --- assets/launcher/helium.desktop.template | 5 ++++- helium_helper.sh | 5 ++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/assets/launcher/helium.desktop.template b/assets/launcher/helium.desktop.template index 22ea353..7334765 100644 --- a/assets/launcher/helium.desktop.template +++ b/assets/launcher/helium.desktop.template @@ -11,7 +11,7 @@ Icon=%ICON_LOCATION% Type=Application Categories=Network;WebBrowser; MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; -Actions=new-window;new-private-window; +Actions=new-window;new-private-window;update; X-AppImage-Version=%APP_VERSION% [Desktop Action new-window] @@ -22,3 +22,6 @@ Exec=%APP_LOCATION% Name=New Incognito Window Exec=%APP_LOCATION% --incognito +[Desktop Action update] +Name=Update Helium +Exec=%AUTO_UPDATE_SCRIPT% \ No newline at end of file diff --git a/helium_helper.sh b/helium_helper.sh index 1698998..1460acf 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -203,13 +203,12 @@ update_helium() { mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old -################ HELP ################ - sed -i "s|X-AppImage-Version=.|X-AppImage-Version=$LOCAL_VERSION|" $LAUNCHER_PATH/$APP_NAME.desktop + sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date !${CRS}\n" break elif [[ "$CONFIRM" == "n" || "$CONFIRM" == "N" ]] ; then - echo -e "\n ${RED}Update cancelled!${CRS}\n" + echo -e " ${RED}Update cancelled!${CRS}\n" exit else From fe0546542fcf0f58aaa70a16b9c09e3cd4c5f50a Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Tue, 23 Dec 2025 11:55:03 +0100 Subject: [PATCH 06/63] Output cleanup --- helium_helper.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 1460acf..ce849b8 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -103,7 +103,7 @@ install_helium() { exit_clean elif [[ "$CONFIRM_INSTALL" == "n" || "$CONFIRM_INSTALL" == "N" ]] ; then - echo -e "\n ${RED}Installation cancelled!${CRS}\n" + echo -e " ${RED}Cancelled!${CRS}\n" exit else @@ -126,8 +126,8 @@ add_launcher() { echo if [[ "$CONFIRM_LAUNCHER" == "" || "$CONFIRM_LAUNCHER" == "y" || "$CONFIRM_LAUNCHER" == "Y" ]] ; then - LAUNCHER_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/stable/assets/launcher/helium.desktop.template - ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/stable/assets/icon/helium.png + LAUNCHER_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/launcher/helium.desktop.template + ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/icon/helium.png LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') wget -P $TMP $LAUNCHER_URL -q --show-progress wget -P $TMP $ICON_URL -q --show-progress @@ -141,7 +141,7 @@ add_launcher() { exit_clean elif [[ "$CONFIRM_LAUNCHER" == "n" || "$CONFIRM_LAUNCHER" == "N" ]] ; then - echo -e "\n ${RED}Launcher creation cancelled!${CRS}\n" + echo -e " ${RED}Cancelled!${CRS}\n" exit else @@ -208,7 +208,7 @@ update_helium() { break elif [[ "$CONFIRM" == "n" || "$CONFIRM" == "N" ]] ; then - echo -e " ${RED}Update cancelled!${CRS}\n" + echo -e " ${RED}Cancelled!${CRS}\n" exit else @@ -256,7 +256,7 @@ remove_helium() { exit elif [[ "$CONFIRM_REMOVE" == "n" || "$CONFIRM_REMOVE" == "N" ]] ; then - echo -e "\n ${RED}Removal cancelled!${CRS}\n" + echo -e " ${RED}Cancelled!${CRS}\n" exit else @@ -374,7 +374,6 @@ while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do i) echo -e "\n ${YEL}Installing $APP_NAME_LONG...${CRS}" dependency_check - local_check install_helium exit_clean exit ;; From f56c1ac3ea5723cbfcd9555a95a010891df7992a Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Tue, 23 Dec 2025 17:47:06 +0100 Subject: [PATCH 07/63] Script updater added --- helium_helper.sh | 149 ++++++++++++++++++++++++++++++++--------------- test.sh | 1 + todo.md | 56 ++++++++++-------- 3 files changed, 134 insertions(+), 72 deletions(-) create mode 100644 test.sh diff --git a/helium_helper.sh b/helium_helper.sh index ce849b8..8fe2dc9 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -19,7 +19,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" -SCRIPT_VERSION="0.5.1" +SCRIPT_VERSION="0.1" DATE=$(date) ## LOCATIONS @@ -58,7 +58,6 @@ dependency_check () { MISSING=$(cat $TMP/missingDeps) echo -e "\n ${RED}Following dependencies are missing :\n\n${CRS}$MISSING\n\n ${CYN}Please install and re-run script !${CRS}" exit_clean - exit fi } @@ -98,13 +97,13 @@ install_helium() { chmod +x $TMP/$GIT_FILENAME mkdir -p $INSTALL_PATH mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage - echo -e "\n ${GRN}$APP_NAME_LONG is installed!${CRS}\n" add_launcher - exit_clean + echo -e "\n ${GRN}$APP_NAME_LONG is installed!${CRS}\n" + break elif [[ "$CONFIRM_INSTALL" == "n" || "$CONFIRM_INSTALL" == "N" ]] ; then - echo -e " ${RED}Cancelled!${CRS}\n" - exit + echo -e " ${RED}Cancelled!${CRS}" + break else echo -e " ${YEL}Invalid response!${CRS}\n" @@ -114,14 +113,14 @@ install_helium() { done } -### LAUNCHER --> TO DO +### LAUNCHER add_launcher() { if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then - echo -e "\n ${RED}${APP_NAME}.desktop already exists!${CRS}" - exit + echo -e "\n ${YEL}${APP_NAME}.desktop already exists!${CRS}" elif [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then while true ; do + echo read -p " Add $APP_NAME_LONG launcher to $LAUNCHER_PATH? (Y/n) : " CONFIRM_LAUNCHER echo @@ -137,12 +136,12 @@ add_launcher() { mkdir -p $LAUNCHER_PATH $BACKUP_PATH $CONFIG_PATH/icon mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon - echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}\n" - exit_clean + echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" + break elif [[ "$CONFIRM_LAUNCHER" == "n" || "$CONFIRM_LAUNCHER" == "N" ]] ; then - echo -e " ${RED}Cancelled!${CRS}\n" - exit + echo -e " ${RED}Launcher not added!${CRS}" + break else echo -e " ${YEL}Invalid response!${CRS}\n" @@ -208,7 +207,7 @@ update_helium() { break elif [[ "$CONFIRM" == "n" || "$CONFIRM" == "N" ]] ; then - echo -e " ${RED}Cancelled!${CRS}\n" + echo -e " ${RED}Cancelled!${CRS}" exit else @@ -237,7 +236,6 @@ auto_update() { else echo -e "\n ${RED}Not implemented yet...${CRS}" - exit fi } @@ -247,16 +245,18 @@ remove_helium() { if [ -d "$INSTALL_PATH" ] ; then while true ; do - read -p " Remove $APP_NAME_LONG folder $INSTALL_PATH? (Y/n) : " CONFIRM_REMOVE + read -p " Remove $APP_NAME_LONG incl. backups and launcher? (Y/n) : " CONFIRM_REMOVE if [[ "$CONFIRM_REMOVE" == "" || "$CONFIRM_REMOVE" == "y" || "$CONFIRM_REMOVE" == "Y" ]] ; then rm -rf $INSTALL_PATH - rm $LAUNCHER_PATH/$APP_NAME.desktop - echo -e "\n ${RED}$APP_NAME_LONG removed!${CRS}\n" + if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then + rm $LAUNCHER_PATH/$APP_NAME.desktop + fi + echo -e "\n ${RED}$APP_NAME_LONG removed!${CRS}" exit elif [[ "$CONFIRM_REMOVE" == "n" || "$CONFIRM_REMOVE" == "N" ]] ; then - echo -e " ${RED}Cancelled!${CRS}\n" + echo -e " ${RED}Cancelled!${CRS}" exit else @@ -267,7 +267,7 @@ remove_helium() { done else - echo -e "\n ${RED}Can't remove $APP_NAME_LONG! ${YEL}$INSTALL_PATH ${RED}directory not found...${CRS}\n" + echo -e "\n ${RED}Can't remove $APP_NAME_LONG! ${YEL}$INSTALL_PATH ${RED}directory not found...${CRS}" exit fi @@ -275,22 +275,83 @@ remove_helium() { ### SCRIPT VERSION script_version() { - echo -e "\n ${CYN}$APP_NAME_LONG Helper Script Version : ${GRN}${SCRIPT_VERSION}${CRS}\n" + echo -e "\n ${CYN}$APP_NAME_LONG Helper Script Version :${CRS} $SCRIPT_VERSION\n" exit } ### UPDATE SCRIPT --> TO DO +remote_script_check() { + REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/helium_helper.sh + mkdir -p $TMP + wget -P $TMP $REMOTE_SCRIPT_URL -q + chmod +x $TMP/$SCRIPT_FILE_NAME +} update_script() { - if ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then - echo -e "\n ${RED}$APP_NAME_LONG AppImage not found! Can't update script...${CRS}" - exit - - else - echo -e "\n ${RED}Not implemented yet...${CRS}" + remote_script_check + + ### CHECK FOR LOCAL SCRIPT + if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then + echo -e "\n ${RED}$SCRIPT_FILE_NAME not found! Can't update script...${CRS}" exit fi + + REMOTE_SCRIPT_VERSION=$($TMP/$SCRIPT_FILE_NAME -s | awk '{print $8}' | tr -d '\n' ) + + ### CHECK FOR EMPTY VERSION TAGS + if [ -z "$SCRIPT_VERSION" ] ; then + echo -e "\n ${RED}Empty version tag from ${CYN}local script${RED}! Can't compare, exiting...${CRS}" + exit + + elif [ -z "$REMOTE_SCRIPT_VERSION" ] ; then + echo -e "\n ${RED}Empty version tag from ${CYN}remote script${RED}! Can't compare, exiting...${CRS}" + exit + + fi + + ### COMPARE LOCAL & REMOTE VERSION + SCRIPT_VERSION_NUM=$(echo $SCRIPT_VERSION | tr -d .) + REMOTE_SCRIPT_VERSION_NUM=$(echo $REMOTE_SCRIPT_VERSION | tr -d .) + + if [ "$REMOTE_SCRIPT_VERSION" == "$SCRIPT_VERSION" ] ; then + echo -e "\n ${GRN}$SCRIPT_FILE_NAME is already up-to-date!${CRS}\n" + echo -e " ${CYN}Local Version :\t${CRS}${SCRIPT_VERSION}" + echo -e " ${CYN}Remote Version :\t${CRS}${REMOTE_SCRIPT_VERSION}\n" + + elif [ "$REMOTE_SCRIPT_VERSION_NUM" -gt "$SCRIPT_VERSION_NUM" ] ; then + echo -e "\n ${YEL}$SCIPT_FILE_NAME is updatable!${CRS}\n" + echo -e " ${CYN}Local Version :\t${CRS}${SCRIPT_VERSION}" + echo -e " ${CYN}Remote Version :\t${CRS}${REMOTE_SCRIPT_VERSION}\n" + + while true ; do + read -p " Update $SCRIPT_FILE_NAME? (Y/n) : " CONFIRM_SCRIPT_UPDATE + echo + + if [[ "$CONFIRM_SCRIPT_UPDATE" == "" || "$CONFIRM_SCRIPT_UPDATE" == "y" || "$CONFIRM_SCRIPT_UPDATE" == "Y" ]] ; then + mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old + mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH + echo -e "\n ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" + break + + elif [[ "$CONFIRM_SCRIPT_UPDATE" == "n" || "$CONFIRM_SCRIPT_UPDATE" == "N" ]] ; then + echo -e " ${RED}Cancelled!${CRS}" + break + + else + echo -e " ${YEL}Invalid response!${CRS}\n" + + fi + + done + + else + echo -e "\n ${RED}Version tags malformed or you are using a Beta version!${CRS}\n" + echo -e " ${CYN}Local Version :\t${CRS}${SCRIPT_VERSION}" + echo -e " ${CYN}Remote Version :\t${CRS}${REMOTE_SCRIPT_VERSION}\n" + echo -e " ${RED}Updating script failed...${CRS}\n" + + fi } ### COMPARE APPIMAGE VERSION @@ -339,16 +400,17 @@ 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 | -u | -r | -c | -s | -h ]\n" # | -U | -S + echo -e "Syntax: $SCRIPT_FILE_NAME [ -i | -l | -u | -r | -c | -s | -h ]\n" # | -U | -S | -a | echo -e "Options:\n" echo -e "\t-i\tDownload & install $APP_NAME_LONG from $SOURCE" - echo -e "\t-L\tCreate desktop launcher" + echo -e "\t-l\tCreate desktop launcher" + echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${RED}--> Not yet working${CRS}" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" echo -e "\t-c\tCompare local to remote version" echo -e "\t-s\tShow script version" - echo -e "\t-S\tUpdate script ${RED}--> Not yet working${CRS}" + echo -e "\t-S\tUpdate $SCRIPT_FILE_NAME ${RED}--> Not yet working${CRS}" echo -e "\t-h\tPrint this help page.\n" echo -e "Configured locations:\n" echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location" @@ -369,38 +431,34 @@ exit_clean() { ########## MAIN ########## ## GET OPTIONS -while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do +while getopts ":i,:l,:a,:u,:U,:r,:c,:s,:S,:h" OPTION ; do case $OPTION in i) echo -e "\n ${YEL}Installing $APP_NAME_LONG...${CRS}" dependency_check install_helium - exit_clean - exit ;; + exit_clean ;; - L) + l) echo -e "\n ${YEL}Adding $APP_NAME_LONG launcher...${CRS}" dependency_check local_check add_launcher - exit_clean - exit ;; + exit_clean ;; u) echo -e "\n ${YEL}Updating $APP_NAME_LONG...${CRS}" dependency_check local_check update_helium - exit_clean - exit ;; + exit_clean ;; U) echo -e "\n ${YEL}Enabling automatic updates...${CRS}" dependency_check local_check auto_update - exit_clean - exit ;; + exit_clean ;; r) echo -e "\n ${YEL}Removing $APP_NAME_LONG...${CRS}" @@ -412,8 +470,7 @@ while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do dependency_check local_check compare_version - exit_clean - exit ;; + exit_clean ;; s) script_version @@ -422,19 +479,17 @@ while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do S) echo -e "\n ${YEL}Updating script...${CRS}" dependency_check - local_check update_script - exit_clean - exit ;; + exit_clean ;; h) help - exit;; + exit ;; *) echo -e "\n${YEL}Option ${RED}$1${YEL} not recognized... Refer to help below!${CRS}" help - exit;; + exit ;; esac diff --git a/test.sh b/test.sh new file mode 100644 index 0000000..a9bf588 --- /dev/null +++ b/test.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/todo.md b/todo.md index 8343156..5bc2c62 100644 --- a/todo.md +++ b/todo.md @@ -4,6 +4,8 @@ - Readme updated - Desktop Entry updater - Launcher has an update option now +- Launcher installer refined +- Clean Up ## Add - Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) @@ -25,37 +27,41 @@ ## Notes +- Auto Update ```sh -############# TO DO - while true ; do - read -p " Enable automatic update check on login? (y/N) : " AUTO_UPDATE +while true ; do + read -p " Enable automatic update check on login? (y/N) : " AUTO_UPDATE - if [[ "$AUTO_UPDATE" == "" || "$AUTO_UPDATE" == "n" || "$AUTO_UPDATE" == "N" ]] ; then - break + if [[ "$AUTO_UPDATE" == "" || "$AUTO_UPDATE" == "n" || "$AUTO_UPDATE" == "N" ]] ; then + break - elif [[ "$AUTO_UPDATE" == "y" || "$AUTO_UPDATE" == "Y" ]] ; then - if ! [ -f "$PROFILE" ] ; then - echo -e "\n ${RED}Following file is missing :\n\n${YEL}$PROFILE\n\n ${CYN}Please investigate and re-run script !${CRS}" - exit 1 + elif [[ "$AUTO_UPDATE" == "y" || "$AUTO_UPDATE" == "Y" ]] ; then + if ! [ -f "$PROFILE" ] ; then + echo -e "\n ${RED}Following file is missing :\n\n${YEL}$PROFILE\n\n ${CYN}Please investigate and re-run script !${CRS}" + exit 1 - else - wget -P $TMP https://lab.c95.org/fr4nz/shell-scripts/src/branch/main/helium-browser/helium_auto_update.sh -q --show-progress - chmod +x $TMP/helium_auto_update.sh - mv $TMP/helium_auto_update.sh $INSTALL_PATH/helium_auto_update.sh - echo >> $PROFILE - echo "### HELIUM AUTO UPDATE ###" >> $PROFILE - echo "${INSTALL_PATH}/helium_auto_update.sh" >> $PROFILE - echo >> $PROFILE - echo -e "\n ${GRN}Automatic updates enabled ! ${CRS}\n" - break + else + wget -P $TMP https://lab.c95.org/fr4nz/shell-scripts/src/branch/main/helium-browser/helium_auto_update.sh -q --show-progress + chmod +x $TMP/helium_auto_update.sh + mv $TMP/helium_auto_update.sh $INSTALL_PATH/helium_auto_update.sh + echo >> $PROFILE + echo "### HELIUM AUTO UPDATE ###" >> $PROFILE + echo "${INSTALL_PATH}/helium_auto_update.sh" >> $PROFILE + echo >> $PROFILE + echo -e "\n ${GRN}Automatic updates enabled ! ${CRS}\n" + break - fi + fi - else - echo -e " ${YEL}Invalid response !${CRS}\n" + else + echo -e " ${YEL}Invalid response !${CRS}\n" - fi + fi - done -############# +done +``` + +- Script update +```sh +$SCRIPT_PATH/$SCRIPT_FILE_NAME -s | awk {'print $8'} ``` \ No newline at end of file From c00811622c47c5215e06377ebcaa0623d52bfb9d Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Tue, 23 Dec 2025 17:48:33 +0100 Subject: [PATCH 08/63] Typo fixed --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 8fe2dc9..c36469a 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -19,7 +19,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" -SCRIPT_VERSION="0.1" +SCRIPT_VERSION="0.5.1" DATE=$(date) ## LOCATIONS From b196c5104f70daa33cfd612bef3bb49cf6316087 Mon Sep 17 00:00:00 2001 From: Fr4nzD13trich Date: Tue, 23 Dec 2025 18:00:10 +0100 Subject: [PATCH 09/63] Script updater ready for testing --- helium_helper.sh | 10 ++++------ todo.md | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index c36469a..42b36d6 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -19,7 +19,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" -SCRIPT_VERSION="0.5.1" +SCRIPT_VERSION="0.5.2" DATE=$(date) ## LOCATIONS @@ -316,11 +316,9 @@ update_script() { if [ "$REMOTE_SCRIPT_VERSION" == "$SCRIPT_VERSION" ] ; then echo -e "\n ${GRN}$SCRIPT_FILE_NAME is already up-to-date!${CRS}\n" - echo -e " ${CYN}Local Version :\t${CRS}${SCRIPT_VERSION}" - echo -e " ${CYN}Remote Version :\t${CRS}${REMOTE_SCRIPT_VERSION}\n" elif [ "$REMOTE_SCRIPT_VERSION_NUM" -gt "$SCRIPT_VERSION_NUM" ] ; then - echo -e "\n ${YEL}$SCIPT_FILE_NAME is updatable!${CRS}\n" + echo -e "\n ${YEL}$SCRIPT_FILE_NAME is updatable!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${SCRIPT_VERSION}" echo -e " ${CYN}Remote Version :\t${CRS}${REMOTE_SCRIPT_VERSION}\n" @@ -331,7 +329,7 @@ update_script() { if [[ "$CONFIRM_SCRIPT_UPDATE" == "" || "$CONFIRM_SCRIPT_UPDATE" == "y" || "$CONFIRM_SCRIPT_UPDATE" == "Y" ]] ; then mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH - echo -e "\n ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" + echo -e " ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" break elif [[ "$CONFIRM_SCRIPT_UPDATE" == "n" || "$CONFIRM_SCRIPT_UPDATE" == "N" ]] ; then @@ -410,7 +408,7 @@ help() { echo -e "\t-r\tRemove $APP_NAME_LONG" echo -e "\t-c\tCompare local to remote version" echo -e "\t-s\tShow script version" - echo -e "\t-S\tUpdate $SCRIPT_FILE_NAME ${RED}--> Not yet working${CRS}" + echo -e "\t-S\tUpdate $SCRIPT_FILE_NAME" echo -e "\t-h\tPrint this help page.\n" echo -e "Configured locations:\n" echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location" diff --git a/todo.md b/todo.md index 5bc2c62..fd434c3 100644 --- a/todo.md +++ b/todo.md @@ -6,15 +6,16 @@ - Launcher has an update option now - Launcher installer refined - Clean Up +- Script updater ## Add - Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) - Desktop entry updater [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) - Auto update setup - shell recognition -- Script updater - Architecture detection - Set alias +- Roll back from backup ## Repo - Merge workflow From 0d99d8e32567e6f4b21ba75e6a392c80622c0bc9 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Tue, 23 Dec 2025 20:21:29 +0100 Subject: [PATCH 10/63] update --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 42b36d6..82550b5 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -280,7 +280,7 @@ script_version() { } -### UPDATE SCRIPT --> TO DO +### UPDATE SCRIPT remote_script_check() { REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/helium_helper.sh mkdir -p $TMP From d8392feac7c2059f8132d8e4bb96eaacc97f9b06 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Tue, 23 Dec 2025 23:07:17 +0100 Subject: [PATCH 11/63] Alias for zsh working --- helium_helper.sh | 100 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 70 insertions(+), 30 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 82550b5..606790a 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -19,8 +19,8 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" -SCRIPT_VERSION="0.5.2" -DATE=$(date) +SCRIPT_VERSION="0.5.3" +ALIAS="update-helium" ## LOCATIONS TMP=/tmp/$APP_NAME @@ -158,6 +158,18 @@ add_launcher() { fi } +### ALIAS +add_alias() { + if [ -f "$HOME/.zshrc" ] ; then + echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >>$HOME/.zshrc + echo -e "\n ${GRN}$ALIAS added to${CRS} $HOME/.zshrc" + + else + echo -e "\n ${RED}No .bashrc like file found!${CRS}" + + fi +} + ### UPDATE update_helium() { LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') @@ -245,26 +257,26 @@ remove_helium() { if [ -d "$INSTALL_PATH" ] ; then while true ; do - read -p " Remove $APP_NAME_LONG incl. backups and launcher? (Y/n) : " CONFIRM_REMOVE + read -p " Remove $APP_NAME_LONG incl. backups and launcher? (Y/n) : " CONFIRM_REMOVE - if [[ "$CONFIRM_REMOVE" == "" || "$CONFIRM_REMOVE" == "y" || "$CONFIRM_REMOVE" == "Y" ]] ; then - rm -rf $INSTALL_PATH - if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then - rm $LAUNCHER_PATH/$APP_NAME.desktop + if [[ "$CONFIRM_REMOVE" == "" || "$CONFIRM_REMOVE" == "y" || "$CONFIRM_REMOVE" == "Y" ]] ; then + rm -rf $INSTALL_PATH + if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then + rm $LAUNCHER_PATH/$APP_NAME.desktop + fi + echo -e "\n ${RED}$APP_NAME_LONG removed!${CRS}" + exit + + elif [[ "$CONFIRM_REMOVE" == "n" || "$CONFIRM_REMOVE" == "N" ]] ; then + echo -e " ${RED}Cancelled!${CRS}" + exit + + else + echo -e " ${YEL}Invalid response!${CRS}\n" + fi - echo -e "\n ${RED}$APP_NAME_LONG removed!${CRS}" - exit - elif [[ "$CONFIRM_REMOVE" == "n" || "$CONFIRM_REMOVE" == "N" ]] ; then - echo -e " ${RED}Cancelled!${CRS}" - exit - - else - echo -e " ${YEL}Invalid response!${CRS}\n" - - fi - - done + done else echo -e "\n ${RED}Can't remove $APP_NAME_LONG! ${YEL}$INSTALL_PATH ${RED}directory not found...${CRS}" @@ -292,8 +304,31 @@ update_script() { ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then - echo -e "\n ${RED}$SCRIPT_FILE_NAME not found! Can't update script...${CRS}" - exit + echo -e "\n ${YEL}$SCRIPT_FILE_NAME not found...${CRS}" + + while true ; do + echo + read -p " Copy script to $SCRIPT_PATH? (Y/n) : " CONFIRM_SCRIPT_INSTALL + + if [[ "$CONFIRM_SCRIPT_INSTALL" == "" || "$CONFIRM_SCRIPT_INSTALL" == "y" || "$CONFIRM_SCRIPT_INSTALL" == "Y" ]] ; then + if ! [ -d "$SCRIPT_PATH" ] ; then + mkdir -p $SCRIPT_PATH + fi + + mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH + echo -e "\n ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" + exit_clean + + elif [[ "$CONFIRM_SCRIPT_INSTALL" == "n" || "$CONFIRM_SCRIPT_INSTALL" == "N" ]] ; then + echo -e " ${RED}Cancelled!${CRS}" + exit + + else + echo -e " ${YEL}Invalid response!${CRS}\n" + + fi + + done fi @@ -398,11 +433,11 @@ 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 | -u | -r | -c | -s | -h ]\n" # | -U | -S | -a | + echo -e "Syntax: $SCRIPT_FILE_NAME [ -i | -l | -a | -u | -r | -c | -s | -S | -h ]\n" # | -U | echo -e "Options:\n" echo -e "\t-i\tDownload & install $APP_NAME_LONG from $SOURCE" echo -e "\t-l\tCreate desktop launcher" - echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${RED}--> Not yet working${CRS}" + echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh${CRS}" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" @@ -432,39 +467,44 @@ exit_clean() { while getopts ":i,:l,:a,:u,:U,:r,:c,:s,:S,:h" OPTION ; do case $OPTION in i) - echo -e "\n ${YEL}Installing $APP_NAME_LONG...${CRS}" + echo -e "\n ${CYN}Installing $APP_NAME_LONG...${CRS}" dependency_check install_helium exit_clean ;; l) - echo -e "\n ${YEL}Adding $APP_NAME_LONG launcher...${CRS}" + echo -e "\n ${CYN}Adding $APP_NAME_LONG launcher...${CRS}" dependency_check local_check add_launcher exit_clean ;; + a) + echo -e "\n ${CYN}Adding alias...${CRS}" + add_alias + exit ;; + u) - echo -e "\n ${YEL}Updating $APP_NAME_LONG...${CRS}" + echo -e "\n ${CYN}Updating $APP_NAME_LONG...${CRS}" dependency_check local_check update_helium exit_clean ;; U) - echo -e "\n ${YEL}Enabling automatic updates...${CRS}" + echo -e "\n ${CYN}Enabling automatic updates...${CRS}" dependency_check local_check auto_update exit_clean ;; r) - echo -e "\n ${YEL}Removing $APP_NAME_LONG...${CRS}" + echo -e "\n ${CYN}Removing $APP_NAME_LONG...${CRS}" remove_helium exit ;; c) - echo -e "\n ${YEL}Comparing remote to local version...${CRS}" + echo -e "\n ${CYN}Comparing remote to local version...${CRS}" dependency_check local_check compare_version @@ -475,7 +515,7 @@ while getopts ":i,:l,:a,:u,:U,:r,:c,:s,:S,:h" OPTION ; do exit ;; S) - echo -e "\n ${YEL}Updating script...${CRS}" + echo -e "\n ${CYN}Updating script...${CRS}" dependency_check update_script exit_clean ;; From 4b041ff1d60952a48d2801916e3d3485bcae30ea Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 00:34:47 +0100 Subject: [PATCH 12/63] Structure change --- helium_auto_update.sh | 293 +++++++++++++++++++++++++++++++----------- 1 file changed, 217 insertions(+), 76 deletions(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 6b82096..9f4405f 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -2,93 +2,234 @@ # HELIUM BOWSER AUTO UPDATE SCRIPT WITH LOGGING -## VARIABLES & TMP FOLDER -mkdir -p /tmp/Helium -TMP=/tmp/Helium -INSTALL_PATH=$HOME/.apps/Helium -LOG=$INSTALL_PATH/updateLog -DEPENDENCIES=("curl" "wget") -MISSING=$(cat $TMP/missingDeps 2>/dev/null) -GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}') -LOCAL_VERSION=$($INSTALL_PATH/helium-browser.AppImage --version | awk '{print $2}') +########## PREREQUISITES ########### +set -e + +## GLOBAL VARIABLES +APP_NAME="Helium" +APP_NAME_LONG="Helium Web Browser" +SOURCE="GitHub" +SCRIPT_NAME="$APP_NAME silent updater" +SCRIPT_FILE_NAME="helium_auto_update.sh" +SCRIPT_VERSION="0.5.3" +ALIAS="auto-update-helium" + +## LOCATIONS +TMP=/tmp/$APP_NAME +INSTALL_PATH=$HOME/.apps/$APP_NAME +CONFIG_PATH=$INSTALL_PATH/assets +BACKUP_PATH=$INSTALL_PATH/assets/backup +LOG_PATH=$INSTALL_PATH/assets/logs +LOG=$LOG_PATH/log +LAUNCHER_PATH=$HOME/.local/share/applications +SCRIPT_PATH=$HOME/.local/bin DATE=$(date) -## CHECKS -if ! [ -d "$INSTALL_PATH" ] ; then - mkdir -p $INSTALL_PATH - echo "${DATE} | Failed to update - Helium installation path not present - But created for logging" >> $LOG - exit 1 - -elif ! [ -f "$INSTALL_PATH/helium-browser.AppImage" ] ; then - echo "${DATE} | Failed to update - Local Helium AppImage not found" >> $LOG - exit 1 - -else - : +########## FUNCTIONS ########### -fi - -### SCRIPT DEPENDENCIES -dependency_check() { +### DEPENDENCIES +cmd_query() { local PACKAGE="$1" - if command -v "$PACKAGE" >/dev/null 2>&1 ; then - : - - else - echo "$PACKAGE" >>$TMP/missingDeps + if ! command -v "$PACKAGE" >/dev/null 2>&1 ; then + echo " - $PACKAGE" >> $TMP/missingDeps fi } -for PACKAGE in "${DEPENDENCIES[@]}" ; do - dependency_check "$PACKAGE" +dependency_check () { + DEPENDENCIES=("curl" "wget") + mkdir -p $TMP + + for PACKAGE in "${DEPENDENCIES[@]}" ; do + cmd_query "$PACKAGE" + + done + + if ! [ -d "$LOG_PATH" ] ; then + mkdir -p $LOG_PATH + echo "${DATE} | Log created" >> $LOG + + fi + + if [ -f "$TMP/missingDeps" ] ; then + MISSING=$(cat $TMP/missingDeps) + echo "${DATE} | Failed to update - missing dependencies : $MISSING" >> $LOG + exit_clean + + fi + + if ! [ -d "$INSTALL_PATH" ] ; then + mkdir -p $INSTALL_PATH + echo "${DATE} | Failed to update - $APP_NAME installation path not present - But created for logging" >> $LOG + exit + + elif ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then + echo "${DATE} | Failed to update - Local $APP_NAME AppImage not found" >> $LOG + exit + + fi + +} + +### UPDATE SCRIPT +remote_script_check() { + REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME + mkdir -p $TMP + wget -P $TMP $REMOTE_SCRIPT_URL -q + chmod +x $TMP/$SCRIPT_FILE_NAME +} + +update_script() { + remote_script_check + + ### CHECK FOR LOCAL SCRIPT + if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then + echo "${DATE} | Failed to update script - local file not found" >> $LOG + + fi + + REMOTE_SCRIPT_VERSION=$($TMP/$SCRIPT_FILE_NAME -s | awk '{print $8}' | tr -d '\n' ) + + ### CHECK FOR EMPTY VERSION TAGS + if [ -z "$SCRIPT_VERSION" ] ; then + echo "${DATE} | Failed to update script - Empty version tag --> local" >> $LOG + + elif [ -z "$REMOTE_SCRIPT_VERSION" ] ; then + echo "${DATE} | Failed to update script - Empty version tag --> $SOURCE" >> $LOG + + fi + + ### COMPARE LOCAL & REMOTE VERSION + SCRIPT_VERSION_NUM=$(echo $SCRIPT_VERSION | tr -d .) + REMOTE_SCRIPT_VERSION_NUM=$(echo $REMOTE_SCRIPT_VERSION | tr -d .) + + if [ "$REMOTE_SCRIPT_VERSION" == "$SCRIPT_VERSION" ] ; then + : + + elif [ "$REMOTE_SCRIPT_VERSION_NUM" -gt "$SCRIPT_VERSION_NUM" ] ; then + mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old + mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH + echo "${DATE} | Script updated" >> $LOG + + else + echo "${DATE} | Failed to update - Malformed version tags" >> $LOG + + fi +} + +### UPDATE +update_helium() { + #update_script ### NEEDS REVIEW + + LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') + GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}') + + ### CHECK FOR EMPTY VERSION TAGS + if [[ -z "$GIT_VERSION" ]] ; then + echo "${DATE} | Failed to update - Empty version tag --> $SOURCE" >> $LOG + exit + + elif [[ -z "$LOCAL_VERSION" ]] ; then + echo "${DATE} | Failed to update - Empty version tag --> LOCAL" >> $LOG + exit + + fi + + ### COMPARE LOCAL & REMOTE VERSION + LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) + GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .) + + if [ "$GIT_VERSION" == "$LOCAL_VERSION" ] ; then + : + + elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') + GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + mkdir -p $TMP $BACKUP_PATH + wget -P $TMP $GIT_URL -q --show-progress + chmod +x $TMP/$GIT_FILENAME + if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then + rm $BACKUP_PATH/$APP_NAME.old + fi + mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old + mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old + sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop + echo "${DATE} | $APP_NAME updated to ${GIT_VERSION}" >> $LOG + + else + echo "${DATE} | Failed to update - Version tags malformed" >> $LOG + exit + + fi + +} + +### SCRIPT VERSION +script_version() { + echo -e "\n ${CYN}$APP_NAME_LONG Helper Script Version :${CRS} $SCRIPT_VERSION\n" + exit + +} + +### HELP +help() { + echo -e "\n${LCY}${SCRIPT_NAME}${CRS}\n" + echo -e "$APP_NAME_LONG automatic updater script\n" + echo -e "Syntax: $SCRIPT_FILE_NAME [ -a | -s | -h ]\n" + echo -e "Options:\n" + echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh${CRS}" + echo -e "\t-s\tShow script version" + echo -e "\t-h\tPrint this help page.\n" + echo -e "Configured locations:\n" + echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location" + echo -e "\t${CYN}${LAUNCHER_PATH}${CRS}\tLauncher location" + echo -e "\t${CYN}${SCRIPT_PATH}${CRS}\t\t\tScript location\n" +} + +### EXIT CLEAN +exit_clean() { + if [ -d "$TMP" ] ; then + rm -rf $TMP + + fi + + exit +} + +########## MAIN ########## + +## GET OPTIONS +while getopts ":a,:s,:h" OPTION ; do + case $OPTION in + + a) + add_alias + exit ;; + + s) + script_version + exit ;; + + h) + help + exit ;; + + *) + echo -e "\n${YEL}Option ${RED}$1${YEL} not recognized... Refer to help below!${CRS}" + help + exit ;; + + esac done -if ! [ "$MISSING" ] ; then - : +## DEPENDENCY CHECK +dependency_check -else - echo "${DATE} | Failed to update - missing dependencies : $MISSING" >> $LOG - exit 1 +## UPDATE +update_helium -fi - -## COMPARE VERSIONS -update_helium() { - GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') - wget -P $TMP $GIT_URL -q - chmod +x $TMP/$GIT_FILENAME - rm $INSTALL_PATH/helium-browser.OldAppImage >/dev/null 2>&1 - mv $INSTALL_PATH/helium-browser.AppImage $INSTALL_PATH/helium-browser.OldAppImage >/dev/null 2>&1 - mv $TMP/$GIT_FILENAME $INSTALL_PATH/helium-browser.AppImage - echo "${DATE} | Helium updated to ${GIT_VERSION}" >> $LOG -} - -### CHECK FOR EMPTY VERSION TAGS -if [[ -z "$GIT_VERSION" ]] ; then - echo "${DATE} | Failed to update - Emty version tag --> GIT" >> $LOG - exit 1 - -elif [[ -z "$LOCAL_VERSION" ]] ; then - echo "${DATE} | Failed to update - Emty version tag --> LOCAL" >> $LOG - exit 1 - -else - : - -fi - -if [[ "$GIT_VERSION" == "$LOCAL_VERSION" ]] ; then - : - -else - update_helium - -fi - -rm -rf $TMP - -exit 0 +## CLEAN +exit_clean \ No newline at end of file From 1e88190670f878b42480ca7047755f65f80f65c7 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 00:35:49 +0100 Subject: [PATCH 13/63] Minor changes --- helium_helper.sh | 10 ++++++---- test.sh | 1 - 2 files changed, 6 insertions(+), 5 deletions(-) delete mode 100644 test.sh diff --git a/helium_helper.sh b/helium_helper.sh index 606790a..e1bccfe 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -129,6 +129,7 @@ add_launcher() { ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/icon/helium.png LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') wget -P $TMP $LAUNCHER_URL -q --show-progress + wget -P $TMP $ICON_URL -q --show-progress sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.AppImage|" $TMP/helium.desktop.template sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template @@ -159,10 +160,10 @@ add_launcher() { } ### ALIAS -add_alias() { +add_alias() { ### WORKS BUT NEEDS WORK if [ -f "$HOME/.zshrc" ] ; then - echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >>$HOME/.zshrc - echo -e "\n ${GRN}$ALIAS added to${CRS} $HOME/.zshrc" + echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc + echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" else echo -e "\n ${RED}No .bashrc like file found!${CRS}" @@ -294,11 +295,12 @@ script_version() { ### UPDATE SCRIPT remote_script_check() { - REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/helium_helper.sh + REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME mkdir -p $TMP wget -P $TMP $REMOTE_SCRIPT_URL -q chmod +x $TMP/$SCRIPT_FILE_NAME } + update_script() { remote_script_check diff --git a/test.sh b/test.sh deleted file mode 100644 index a9bf588..0000000 --- a/test.sh +++ /dev/null @@ -1 +0,0 @@ -#!/bin/bash From 3cbcd74f069a97947b5cb51f02e8167c1b57d049 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 10:48:01 +0100 Subject: [PATCH 14/63] Launcher option added --- helium_helper.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index e1bccfe..d2b71b3 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -19,6 +19,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" +AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh" SCRIPT_VERSION="0.5.3" ALIAS="update-helium" @@ -127,13 +128,18 @@ add_launcher() { if [[ "$CONFIRM_LAUNCHER" == "" || "$CONFIRM_LAUNCHER" == "y" || "$CONFIRM_LAUNCHER" == "Y" ]] ; then LAUNCHER_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/launcher/helium.desktop.template ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/icon/helium.png + AUTO_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$AUTO_SCRIPT_FILE_NAME LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') + if ! [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then + wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress + chmod +x $TMP/$AUTO_SCRIPT_FILE_NAME + fi wget -P $TMP $LAUNCHER_URL -q --show-progress - wget -P $TMP $ICON_URL -q --show-progress sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.AppImage|" $TMP/helium.desktop.template sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template + sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template mkdir -p $LAUNCHER_PATH $BACKUP_PATH $CONFIG_PATH/icon mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon From b4f3ea4e97c62219651e09be8a675977cca0ef7f Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 10:54:06 +0100 Subject: [PATCH 15/63] to do updated --- todo.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/todo.md b/todo.md index fd434c3..a594d9e 100644 --- a/todo.md +++ b/todo.md @@ -2,7 +2,7 @@ ## Last Jobs - Readme updated -- Desktop Entry updater +- Desktop Entry updater --> Complete - Launcher has an update option now - Launcher installer refined - Clean Up @@ -10,12 +10,12 @@ ## Add - Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) -- Desktop entry updater [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) - Auto update setup - shell recognition - Architecture detection -- Set alias +- Set alias --> Partially - Roll back from backup +- Config check ## Repo - Merge workflow @@ -24,7 +24,6 @@ - Remove comment from script ## Fix -- sed commad at launcher backup ## Notes @@ -61,8 +60,3 @@ while true ; do done ``` - -- Script update -```sh -$SCRIPT_PATH/$SCRIPT_FILE_NAME -s | awk {'print $8'} -``` \ No newline at end of file From 08ce780cee243b0cabe78167b70049bf6499527b Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 10:57:28 +0100 Subject: [PATCH 16/63] Minor changes --- helium_auto_update.sh | 2 +- helium_helper.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 9f4405f..a8cb79c 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -11,7 +11,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME silent updater" SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.3" +SCRIPT_VERSION="0.5.4" ALIAS="auto-update-helium" ## LOCATIONS diff --git a/helium_helper.sh b/helium_helper.sh index d2b71b3..7b8ed93 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -20,7 +20,7 @@ SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.3" +SCRIPT_VERSION="0.5.4" ALIAS="update-helium" ## LOCATIONS From 7203078768b95449065692a5719cd9cca82664ed Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 11:11:25 +0100 Subject: [PATCH 17/63] Script updater extended --- helium_helper.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helium_helper.sh b/helium_helper.sh index 7b8ed93..d133197 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -370,6 +370,9 @@ update_script() { echo if [[ "$CONFIRM_SCRIPT_UPDATE" == "" || "$CONFIRM_SCRIPT_UPDATE" == "y" || "$CONFIRM_SCRIPT_UPDATE" == "Y" ]] ; then + if ! [ -d "$BACKUP_PATH" ] ; then + mkdir -p $BACKUP_PATH + fi mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH echo -e " ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" From 14b7be590a2a0076784d5867b90994601953882d Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 11:19:53 +0100 Subject: [PATCH 18/63] Minor changes --- helium_helper.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/helium_helper.sh b/helium_helper.sh index d133197..1962d1a 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -141,6 +141,7 @@ add_launcher() { sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template mkdir -p $LAUNCHER_PATH $BACKUP_PATH $CONFIG_PATH/icon + mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" From d65799e4a80e82eae6b8d934614bcdb4e4d50062 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 11:24:52 +0100 Subject: [PATCH 19/63] Alias for bashrc added --- helium_helper.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 1962d1a..96cda3c 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -172,6 +172,10 @@ add_alias() { ### WORKS BUT NEEDS WORK echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" + elif [ -f "$HOME/.bashrc" ] ; then + echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc + echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.bashrc" + else echo -e "\n ${RED}No .bashrc like file found!${CRS}" @@ -449,7 +453,7 @@ help() { echo -e "Options:\n" echo -e "\t-i\tDownload & install $APP_NAME_LONG from $SOURCE" echo -e "\t-l\tCreate desktop launcher" - echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh${CRS}" + echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Partially working with zsh & bash${CRS}" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" From 0cf476a6863cc326d726364268b2ba830ad6f030 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 13:03:16 +0100 Subject: [PATCH 20/63] Readme & To Do updated --- README.md | 4 ++-- todo.md | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d0a2786..14d237a 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ ## Overview ### Helium_Helper.sh - Interactive installer and updater script -- Installs to `/home//.apps/Helium` | changeable in line 27 `INSTALL_PATH` +- Installs to `/home//.apps/Helium` | changeable in line 28 `INSTALL_PATH` - Assumes: - - Presence of `/home//.apps/Helium` when updating | changeable in line 27 `INSTALL_PATH` + - Presence of `/home//.apps/Helium` when updating | changeable in line 28 `INSTALL_PATH` - Executable named `Helium.AppImage` | for convenience so launchers don't have to be edited at each update - Keeps prior AppImage as `Helium.old` which will be replaced at every update - Adds desktop launcher to `/home//.local/share/applications` diff --git a/todo.md b/todo.md index a594d9e..56f38bb 100644 --- a/todo.md +++ b/todo.md @@ -16,6 +16,7 @@ - Set alias --> Partially - Roll back from backup - Config check +- Desktop notifications in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) ## Repo - Merge workflow From aa1e3831db07b440bdf1e0332c90a8c987f4c4ef Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 13:05:33 +0100 Subject: [PATCH 21/63] To Do updated --- todo.md | 1 + 1 file changed, 1 insertion(+) diff --git a/todo.md b/todo.md index 56f38bb..5793dba 100644 --- a/todo.md +++ b/todo.md @@ -17,6 +17,7 @@ - Roll back from backup - Config check - Desktop notifications in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) +- Log viewer & config editor ## Repo - Merge workflow From d435cdb276a7a636561a9912f9708b29ba5a8894 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 13:53:16 +0100 Subject: [PATCH 22/63] Minor changes --- helium_helper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 96cda3c..083f0b7 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -133,14 +133,16 @@ add_launcher() { if ! [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress chmod +x $TMP/$AUTO_SCRIPT_FILE_NAME + fi + wget -P $TMP $LAUNCHER_URL -q --show-progress wget -P $TMP $ICON_URL -q --show-progress sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.AppImage|" $TMP/helium.desktop.template sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template - mkdir -p $LAUNCHER_PATH $BACKUP_PATH $CONFIG_PATH/icon + mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon From 1c7c7163d0e0beb9ede5a75ecf2b678c7367bc1e Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 13:55:36 +0100 Subject: [PATCH 23/63] Minor changes --- helium_helper.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 083f0b7..d3c8d2b 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -123,7 +123,6 @@ add_launcher() { while true ; do echo read -p " Add $APP_NAME_LONG launcher to $LAUNCHER_PATH? (Y/n) : " CONFIRM_LAUNCHER - echo if [[ "$CONFIRM_LAUNCHER" == "" || "$CONFIRM_LAUNCHER" == "y" || "$CONFIRM_LAUNCHER" == "Y" ]] ; then LAUNCHER_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/launcher/helium.desktop.template From 234df445f861140aba4cd9bdfa1baee26a85c3e0 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 13:59:53 +0100 Subject: [PATCH 24/63] Minor changes --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index d3c8d2b..0cf37f7 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -141,7 +141,7 @@ add_launcher() { sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template - mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon + mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon >/dev/null mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon From 238e02e8aa9db5b3b4888d9b7d2c23148d06ab5a Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 14:02:56 +0100 Subject: [PATCH 25/63] Minor changes --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 0cf37f7..b479e6f 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -141,7 +141,7 @@ add_launcher() { sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template - mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon >/dev/null + mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon >/dev/null 2>&1 mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon From d962b1b1f0ac74ed572c4b6c67fdf23a3fbd632a Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 14:07:28 +0100 Subject: [PATCH 26/63] Minor changes --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index b479e6f..d3c8d2b 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -141,7 +141,7 @@ add_launcher() { sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template - mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon >/dev/null 2>&1 + mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon From 932856401c8d447f7ede22b77ecbfe06124825ae Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 14:19:07 +0100 Subject: [PATCH 27/63] add alias fixed --- helium_helper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index d3c8d2b..74ec2e8 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -168,7 +168,9 @@ add_launcher() { } ### ALIAS -add_alias() { ### WORKS BUT NEEDS WORK +add_alias() { ### WORKS BUT NEEDS WORK --> CHECK SCRIPT PRESENCE FIRST + update_script + if [ -f "$HOME/.zshrc" ] ; then echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" From 3bc94234cf382a2cec3bb532da21ee9fa9101e72 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 14:27:44 +0100 Subject: [PATCH 28/63] add launcher fixed --- helium_helper.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 74ec2e8..beee6d5 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -129,10 +129,11 @@ add_launcher() { ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/icon/helium.png AUTO_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$AUTO_SCRIPT_FILE_NAME LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') + mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon if ! [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress chmod +x $TMP/$AUTO_SCRIPT_FILE_NAME - + mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH fi wget -P $TMP $LAUNCHER_URL -q --show-progress @@ -141,8 +142,6 @@ add_launcher() { sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template - mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon - mv $TMP/$AUTO_SCRIPT_FILE_NAME $SCRIPT_PATH mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" @@ -170,7 +169,7 @@ add_launcher() { ### ALIAS add_alias() { ### WORKS BUT NEEDS WORK --> CHECK SCRIPT PRESENCE FIRST update_script - + if [ -f "$HOME/.zshrc" ] ; then echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" From 0eec37352abefd90185d6e36fca1b622be738405 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Wed, 24 Dec 2025 14:41:06 +0100 Subject: [PATCH 29/63] add alias fixed --- helium_helper.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index beee6d5..a48ec40 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -168,8 +168,13 @@ add_launcher() { ### ALIAS add_alias() { ### WORKS BUT NEEDS WORK --> CHECK SCRIPT PRESENCE FIRST - update_script - + if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then + mkdir -p $SCRIPT_PATH + wget -P $TMP $SCRIPT_URL -q + chmod +x $TMP/$SCRIPT_FILE_NAME + mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH + fi + if [ -f "$HOME/.zshrc" ] ; then echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" From 5a0913a29a5899f4fa912c669e61bf1e17664f73 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 21:56:44 +0100 Subject: [PATCH 30/63] update --- helium_helper.sh | 4 ++-- todo.md | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index a48ec40..494b272 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -167,7 +167,7 @@ add_launcher() { } ### ALIAS -add_alias() { ### WORKS BUT NEEDS WORK --> CHECK SCRIPT PRESENCE FIRST +add_alias() { ### WORKS BUT NEEDS WORK if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then mkdir -p $SCRIPT_PATH wget -P $TMP $SCRIPT_URL -q @@ -184,7 +184,7 @@ add_alias() { ### WORKS BUT NEEDS WORK --> CHECK SCRIPT PRESENCE FIRST echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.bashrc" else - echo -e "\n ${RED}No .bashrc like file found!${CRS}" + echo -e "\n ${RED}No .shellrc file found!${CRS}" fi } diff --git a/todo.md b/todo.md index 5793dba..fd46dc7 100644 --- a/todo.md +++ b/todo.md @@ -11,13 +11,15 @@ ## Add - Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) - Auto update setup - - shell recognition + - shell recognition missing - Architecture detection - Set alias --> Partially + - shell recognition missing - Roll back from backup - Config check - Desktop notifications in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) - Log viewer & config editor +- Add alias remover to remover function ## Repo - Merge workflow From a0ac02743abad43e756b3604aca38bc78c56452f Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 22:10:11 +0100 Subject: [PATCH 31/63] Alias refined --- helium_helper.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 494b272..2179147 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -81,7 +81,7 @@ local_check() { ### INSTALL install_helium() { if [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then - echo -e "\n ${CYN}$APP_NAME_LONG AppImage found! Trying to update...${CRS}" + echo -e "\n ${YEL}$APP_NAME_LONG AppImage found! Trying to update...${CRS}" update_helium exit @@ -176,10 +176,18 @@ add_alias() { ### WORKS BUT NEEDS WORK fi if [ -f "$HOME/.zshrc" ] ; then + if [ "$(cat $HOME/.zshrc | grep "$ALIAS")" ] ; then + echo -e "\n ${LCY}$ALIAS ${GRN}already present in${CRS} $HOME/.zshrc" + exit + fi echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.zshrc" elif [ -f "$HOME/.bashrc" ] ; then + if [ "$(cat $HOME/.bashrc | grep "$ALIAS")" ] ; then + echo -e "\n ${LCY}$ALIAS ${GRN}already present in${CRS} $HOME/.bashrc" + exit + fi echo "alias $ALIAS=\"$SCRIPT_PATH/$SCRIPT_FILE_NAME\"" >> $HOME/.zshrc echo -e "\n ${LCY}$ALIAS ${GRN}added to${CRS} $HOME/.bashrc" From 70a5db2ba28a9a8abb11a0b0ce15164527d26b40 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 22:12:20 +0100 Subject: [PATCH 32/63] -U option removed --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 2179147..d04069d 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -470,7 +470,7 @@ help() { echo -e "\t-l\tCreate desktop launcher" echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Partially working with zsh & bash${CRS}" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" - echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" + #echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" echo -e "\t-c\tCompare local to remote version" echo -e "\t-s\tShow script version" From 5e26f8e43bbb3e48edc9113a5012c05ae2eebd7b Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 22:14:42 +0100 Subject: [PATCH 33/63] Version bumped --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index d04069d..8ee7ab7 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -20,7 +20,7 @@ SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.4" +SCRIPT_VERSION="0.5.5" ALIAS="update-helium" ## LOCATIONS From 4a6741f581df497d8ad539cd18e09174caa97e1b Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 22:34:10 +0100 Subject: [PATCH 34/63] Alias remover added --- helium_helper.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/helium_helper.sh b/helium_helper.sh index 8ee7ab7..12bfacf 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -290,7 +290,17 @@ remove_helium() { rm -rf $INSTALL_PATH if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then rm $LAUNCHER_PATH/$APP_NAME.desktop + fi + + if [ -f "$HOME/.zshrc" ] ; then + sed -i "s|$ALIAS|d|" $HOME/.zshrc + + elif [ -f "$HOME/.bashrc" ] ; then + sed -i "s|$ALIAS|d|" $HOME/.bashrc + + fi + echo -e "\n ${RED}$APP_NAME_LONG removed!${CRS}" exit From 5ad81a5997751fdba4b466e3485060c2f4f589fb Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 23:34:50 +0100 Subject: [PATCH 35/63] Desktop notifications added --- helium_auto_update.sh | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index a8cb79c..123c274 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -86,6 +86,8 @@ update_script() { ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo "${DATE} | Failed to update script - local file not found" >> $LOG + notify-send "Helium Helper" "Script update failed! See log for details" + exit fi @@ -94,9 +96,13 @@ update_script() { ### CHECK FOR EMPTY VERSION TAGS if [ -z "$SCRIPT_VERSION" ] ; then echo "${DATE} | Failed to update script - Empty version tag --> local" >> $LOG + notify-send "Helium Helper" "Script update failed! See log for details" + exit elif [ -z "$REMOTE_SCRIPT_VERSION" ] ; then echo "${DATE} | Failed to update script - Empty version tag --> $SOURCE" >> $LOG + notify-send "Helium Helper" "Script update failed! See log for details" + exit fi @@ -105,16 +111,18 @@ update_script() { REMOTE_SCRIPT_VERSION_NUM=$(echo $REMOTE_SCRIPT_VERSION | tr -d .) if [ "$REMOTE_SCRIPT_VERSION" == "$SCRIPT_VERSION" ] ; then - : + notify-send "Helium Helper" "Script is up-to-date" elif [ "$REMOTE_SCRIPT_VERSION_NUM" -gt "$SCRIPT_VERSION_NUM" ] ; then mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH echo "${DATE} | Script updated" >> $LOG + notify-send "Helium Helper" "Script updated" else echo "${DATE} | Failed to update - Malformed version tags" >> $LOG - + notify-send "Helium Helper" "Script update failed! See log for details" + fi } @@ -128,10 +136,12 @@ update_helium() { ### CHECK FOR EMPTY VERSION TAGS if [[ -z "$GIT_VERSION" ]] ; then echo "${DATE} | Failed to update - Empty version tag --> $SOURCE" >> $LOG + notify-send "Helium Helper" "Browser update failed! See log for details" exit elif [[ -z "$LOCAL_VERSION" ]] ; then echo "${DATE} | Failed to update - Empty version tag --> LOCAL" >> $LOG + notify-send "Helium Helper" "Browser update failed! See log for details" exit fi @@ -141,7 +151,7 @@ update_helium() { GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .) if [ "$GIT_VERSION" == "$LOCAL_VERSION" ] ; then - : + notify-send "Helium Helper" "Browser is up-to-date" elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') @@ -157,9 +167,11 @@ update_helium() { cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop echo "${DATE} | $APP_NAME updated to ${GIT_VERSION}" >> $LOG + notify-send "Helium Helper" "Browser updated to $GIT_VERSION" else echo "${DATE} | Failed to update - Version tags malformed" >> $LOG + notify-send "Helium Helper" "Browser update failed! See log for details" exit fi @@ -204,22 +216,22 @@ exit_clean() { while getopts ":a,:s,:h" OPTION ; do case $OPTION in - a) - add_alias - exit ;; + S) + update_script + exit_clean ;; s) script_version - exit ;; + exit_clean ;; h) help - exit ;; + exit_clean ;; *) echo -e "\n${YEL}Option ${RED}$1${YEL} not recognized... Refer to help below!${CRS}" help - exit ;; + exit_clean ;; esac From a03f59d3ee3c6d528d56c8c3220ee5e145999e6b Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 23:46:17 +0100 Subject: [PATCH 36/63] Launcher option added --- assets/launcher/helium.desktop.template | 6 +++++- helium_auto_update.sh | 9 ++++----- helium_helper.sh | 3 ++- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/assets/launcher/helium.desktop.template b/assets/launcher/helium.desktop.template index 7334765..a1e02ac 100644 --- a/assets/launcher/helium.desktop.template +++ b/assets/launcher/helium.desktop.template @@ -24,4 +24,8 @@ Exec=%APP_LOCATION% --incognito [Desktop Action update] Name=Update Helium -Exec=%AUTO_UPDATE_SCRIPT% \ No newline at end of file +Exec=%QUIET_UPDATE_SCRIPT% + +[Desktop Action update-script] +Name=Update Helium Helper +Exec=%QUIET_UPDATE_SCRIPT -S% \ No newline at end of file diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 123c274..b204675 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -9,9 +9,9 @@ set -e APP_NAME="Helium" APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" -SCRIPT_NAME="$APP_NAME silent updater" +SCRIPT_NAME="$APP_NAME quiet updater" SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.4" +SCRIPT_VERSION="0.5.5" ALIAS="auto-update-helium" ## LOCATIONS @@ -180,8 +180,7 @@ update_helium() { ### SCRIPT VERSION script_version() { - echo -e "\n ${CYN}$APP_NAME_LONG Helper Script Version :${CRS} $SCRIPT_VERSION\n" - exit + echo -e "\n ${CYN}$APP_NAME_LONG Auto Update Script Version :${CRS} $SCRIPT_VERSION\n" } @@ -213,7 +212,7 @@ exit_clean() { ########## MAIN ########## ## GET OPTIONS -while getopts ":a,:s,:h" OPTION ; do +while getopts ":a,:s,:S,:h" OPTION ; do case $OPTION in S) diff --git a/helium_helper.sh b/helium_helper.sh index 12bfacf..964c2da 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -141,7 +141,8 @@ add_launcher() { sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.AppImage|" $TMP/helium.desktop.template sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template - sed -i "s|%AUTO_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template + sed -i "s|%QUIET_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template + sed -i "s|%QUIET_UPDATE_SCRIPT -S%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -S|" $TMP/helium.desktop.template mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" From e394371b2c6c0de2fb4c8b5c5ebbdbadd0f28e01 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Fri, 26 Dec 2025 23:52:12 +0100 Subject: [PATCH 37/63] update --- assets/launcher/helium.desktop.template | 2 +- helium_helper.sh | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/launcher/helium.desktop.template b/assets/launcher/helium.desktop.template index a1e02ac..b86692f 100644 --- a/assets/launcher/helium.desktop.template +++ b/assets/launcher/helium.desktop.template @@ -11,7 +11,7 @@ Icon=%ICON_LOCATION% Type=Application Categories=Network;WebBrowser; MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; -Actions=new-window;new-private-window;update; +Actions=new-window;new-private-window;update;update-script; X-AppImage-Version=%APP_VERSION% [Desktop Action new-window] diff --git a/helium_helper.sh b/helium_helper.sh index 964c2da..483f11a 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -123,6 +123,7 @@ add_launcher() { while true ; do echo read -p " Add $APP_NAME_LONG launcher to $LAUNCHER_PATH? (Y/n) : " CONFIRM_LAUNCHER + echo if [[ "$CONFIRM_LAUNCHER" == "" || "$CONFIRM_LAUNCHER" == "y" || "$CONFIRM_LAUNCHER" == "Y" ]] ; then LAUNCHER_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/launcher/helium.desktop.template From 69378db024802e090266d23f949b0e50a8f98cd1 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 00:01:25 +0100 Subject: [PATCH 38/63] update --- assets/launcher/helium.desktop.template | 2 +- helium_helper.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/assets/launcher/helium.desktop.template b/assets/launcher/helium.desktop.template index b86692f..c3865fa 100644 --- a/assets/launcher/helium.desktop.template +++ b/assets/launcher/helium.desktop.template @@ -28,4 +28,4 @@ Exec=%QUIET_UPDATE_SCRIPT% [Desktop Action update-script] Name=Update Helium Helper -Exec=%QUIET_UPDATE_SCRIPT -S% \ No newline at end of file +Exec=%SCRIPT_UPDATE% \ No newline at end of file diff --git a/helium_helper.sh b/helium_helper.sh index 483f11a..2f892e5 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -143,7 +143,7 @@ add_launcher() { sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%QUIET_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template - sed -i "s|%QUIET_UPDATE_SCRIPT -S%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -S|" $TMP/helium.desktop.template + sed -i "s|%SCRIPT_UPDATE%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -S|" $TMP/helium.desktop.template mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" From 2f8d7b8246cb02a9221a6d123027420f38e3efb2 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 10:50:45 +0100 Subject: [PATCH 39/63] Remote script check simplified --- helium_helper.sh | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 2f892e5..e9ff09d 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -20,7 +20,7 @@ SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.5" +SCRIPT_VERSION="0.5.6" ALIAS="update-helium" ## LOCATIONS @@ -332,16 +332,7 @@ script_version() { } ### UPDATE SCRIPT -remote_script_check() { - REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME - mkdir -p $TMP - wget -P $TMP $REMOTE_SCRIPT_URL -q - chmod +x $TMP/$SCRIPT_FILE_NAME -} - update_script() { - remote_script_check - ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo -e "\n ${YEL}$SCRIPT_FILE_NAME not found...${CRS}" @@ -354,7 +345,9 @@ update_script() { if ! [ -d "$SCRIPT_PATH" ] ; then mkdir -p $SCRIPT_PATH fi - + mkdir -p $TMP + wget -P $TMP $REMOTE_SCRIPT_URL -q + chmod +x $TMP/$SCRIPT_FILE_NAME mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH echo -e "\n ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" exit_clean @@ -372,7 +365,7 @@ update_script() { fi - REMOTE_SCRIPT_VERSION=$($TMP/$SCRIPT_FILE_NAME -s | awk '{print $8}' | tr -d '\n' ) + REMOTE_SCRIPT_VERSION=$(curl -s https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME | grep -m 1 "SCRIPT_VERSION" | tr -d 'SCRIPT_VERSION="') ### CHECK FOR EMPTY VERSION TAGS if [ -z "$SCRIPT_VERSION" ] ; then @@ -406,6 +399,9 @@ update_script() { mkdir -p $BACKUP_PATH fi mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old + mkdir -p $TMP + wget -P $TMP $REMOTE_SCRIPT_URL -q + chmod +x $TMP/$SCRIPT_FILE_NAME mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH echo -e " ${GRN}$SCRIPT_FILE_NAME is up-to-date!${CRS}" break @@ -480,7 +476,7 @@ help() { echo -e "Options:\n" echo -e "\t-i\tDownload & install $APP_NAME_LONG from $SOURCE" echo -e "\t-l\tCreate desktop launcher" - echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Partially working with zsh & bash${CRS}" + echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh & bash${CRS}" echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" #echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" From 6dccf9c1e445fed849f1167fd1ee176a04f09431 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 10:51:11 +0100 Subject: [PATCH 40/63] Remote script check simplified; Icon added to desktop notification --- helium_auto_update.sh | 44 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index b204675..11837ed 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -11,7 +11,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME quiet updater" SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.5" +SCRIPT_VERSION="0.5.6" ALIAS="auto-update-helium" ## LOCATIONS @@ -22,6 +22,7 @@ BACKUP_PATH=$INSTALL_PATH/assets/backup LOG_PATH=$INSTALL_PATH/assets/logs LOG=$LOG_PATH/log LAUNCHER_PATH=$HOME/.local/share/applications +ICON=$CONFIG_PATH/icon/helium.png SCRIPT_PATH=$HOME/.local/bin DATE=$(date) @@ -73,35 +74,26 @@ dependency_check () { } ### UPDATE SCRIPT -remote_script_check() { - REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME - mkdir -p $TMP - wget -P $TMP $REMOTE_SCRIPT_URL -q - chmod +x $TMP/$SCRIPT_FILE_NAME -} - update_script() { - remote_script_check - ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo "${DATE} | Failed to update script - local file not found" >> $LOG - notify-send "Helium Helper" "Script update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Script update failed! See log for details" exit fi - REMOTE_SCRIPT_VERSION=$($TMP/$SCRIPT_FILE_NAME -s | awk '{print $8}' | tr -d '\n' ) + REMOTE_SCRIPT_VERSION=$(curl -s https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME | grep -m 1 "SCRIPT_VERSION" | tr -d 'SCRIPT_VERSION="') ### CHECK FOR EMPTY VERSION TAGS if [ -z "$SCRIPT_VERSION" ] ; then echo "${DATE} | Failed to update script - Empty version tag --> local" >> $LOG - notify-send "Helium Helper" "Script update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Script update failed! See log for details" exit elif [ -z "$REMOTE_SCRIPT_VERSION" ] ; then echo "${DATE} | Failed to update script - Empty version tag --> $SOURCE" >> $LOG - notify-send "Helium Helper" "Script update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Script update failed! See log for details" exit fi @@ -111,37 +103,38 @@ update_script() { REMOTE_SCRIPT_VERSION_NUM=$(echo $REMOTE_SCRIPT_VERSION | tr -d .) if [ "$REMOTE_SCRIPT_VERSION" == "$SCRIPT_VERSION" ] ; then - notify-send "Helium Helper" "Script is up-to-date" + notify-send -i "$ICON" "Helium Helper" "Script is up-to-date" elif [ "$REMOTE_SCRIPT_VERSION_NUM" -gt "$SCRIPT_VERSION_NUM" ] ; then mv $SCRIPT_PATH/$SCRIPT_FILE_NAME $BACKUP_PATH/$SCRIPT_FILE_NAME.old + mkdir -p $TMP + wget -P $TMP $REMOTE_SCRIPT_URL -q + chmod +x $TMP/$SCRIPT_FILE_NAME mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH - echo "${DATE} | Script updated" >> $LOG - notify-send "Helium Helper" "Script updated" + echo "${DATE} | Script updated to $REMOTE_SCRIPT_VERSION" >> $LOG + notify-send -i "$ICON" "Helium Helper" "Script updated to $REMOTE_SCRIPT_VERSION" else echo "${DATE} | Failed to update - Malformed version tags" >> $LOG - notify-send "Helium Helper" "Script update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Script update failed! See log for details\n$REMOTE_SCRIPT_VERSION $SCRIPT_VERSION" fi } ### UPDATE update_helium() { - #update_script ### NEEDS REVIEW - LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS if [[ -z "$GIT_VERSION" ]] ; then echo "${DATE} | Failed to update - Empty version tag --> $SOURCE" >> $LOG - notify-send "Helium Helper" "Browser update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Browser update failed! See log for details" exit elif [[ -z "$LOCAL_VERSION" ]] ; then echo "${DATE} | Failed to update - Empty version tag --> LOCAL" >> $LOG - notify-send "Helium Helper" "Browser update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Browser update failed! See log for details" exit fi @@ -151,7 +144,7 @@ update_helium() { GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .) if [ "$GIT_VERSION" == "$LOCAL_VERSION" ] ; then - notify-send "Helium Helper" "Browser is up-to-date" + notify-send -i "$ICON" "Helium Helper" "Browser is up-to-date" elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') @@ -167,11 +160,11 @@ update_helium() { cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop echo "${DATE} | $APP_NAME updated to ${GIT_VERSION}" >> $LOG - notify-send "Helium Helper" "Browser updated to $GIT_VERSION" + notify-send -i "$ICON" "Helium Helper" "Browser updated to $GIT_VERSION" else echo "${DATE} | Failed to update - Version tags malformed" >> $LOG - notify-send "Helium Helper" "Browser update failed! See log for details" + notify-send -i "$ICON" "Helium Helper" "Browser update failed! See log for details" exit fi @@ -216,6 +209,7 @@ while getopts ":a,:s,:S,:h" OPTION ; do case $OPTION in S) + dependency_check update_script exit_clean ;; From 57c0770950b563690f8a712c1556d4ab48cea2ef Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 11:01:30 +0100 Subject: [PATCH 41/63] Fixed missing variable --- helium_auto_update.sh | 2 ++ helium_helper.sh | 2 ++ 2 files changed, 4 insertions(+) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 11837ed..11a2ebc 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -75,6 +75,8 @@ dependency_check () { ### UPDATE SCRIPT update_script() { + REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME + ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo "${DATE} | Failed to update script - local file not found" >> $LOG diff --git a/helium_helper.sh b/helium_helper.sh index e9ff09d..2217b41 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -333,6 +333,8 @@ script_version() { ### UPDATE SCRIPT update_script() { + REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME + ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo -e "\n ${YEL}$SCRIPT_FILE_NAME not found...${CRS}" From f42029b0f61ed0e871edb06ffff5579762c19520 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 11:53:18 +0100 Subject: [PATCH 42/63] Log view function added --- assets/launcher/helium.desktop.template | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/assets/launcher/helium.desktop.template b/assets/launcher/helium.desktop.template index c3865fa..e5a55c5 100644 --- a/assets/launcher/helium.desktop.template +++ b/assets/launcher/helium.desktop.template @@ -11,7 +11,7 @@ Icon=%ICON_LOCATION% Type=Application Categories=Network;WebBrowser; MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; -Actions=new-window;new-private-window;update;update-script; +Actions=new-window;new-private-window;update;update-script;show-log; X-AppImage-Version=%APP_VERSION% [Desktop Action new-window] @@ -28,4 +28,8 @@ Exec=%QUIET_UPDATE_SCRIPT% [Desktop Action update-script] Name=Update Helium Helper -Exec=%SCRIPT_UPDATE% \ No newline at end of file +Exec=%SCRIPT_UPDATE% + +[Desktop Action show-log] +Name=Show Update Log +Exec=%OPEN_LOG_EDITOR% \ No newline at end of file From 9586095f86b1bcb32cae1fc12c1d0c119232d591 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 11:53:59 +0100 Subject: [PATCH 43/63] Log View added; Removal extended --- helium_auto_update.sh | 21 ++++++++++++++++----- helium_helper.sh | 12 ++++++++++-- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 11a2ebc..a7d8ecf 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -11,7 +11,7 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME quiet updater" SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.6" +SCRIPT_VERSION="0.5.5" ALIAS="auto-update-helium" ## LOCATIONS @@ -76,7 +76,7 @@ dependency_check () { ### UPDATE SCRIPT update_script() { REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME - + ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo "${DATE} | Failed to update script - local file not found" >> $LOG @@ -179,19 +179,26 @@ script_version() { } +### SHOW LOG +show_log() { + xdg-open $LOG +} + ### HELP help() { echo -e "\n${LCY}${SCRIPT_NAME}${CRS}\n" echo -e "$APP_NAME_LONG automatic updater script\n" - echo -e "Syntax: $SCRIPT_FILE_NAME [ -a | -s | -h ]\n" + echo -e "Syntax: $SCRIPT_FILE_NAME [ -s | -S | -L | -h ]\n" echo -e "Options:\n" - echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh${CRS}" echo -e "\t-s\tShow script version" + echo -e "\t-S\tUpdate $SCRIPT_FILE_NAME" + echo -e "\t-L\tOpen log in default text editor" echo -e "\t-h\tPrint this help page.\n" echo -e "Configured locations:\n" echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location" echo -e "\t${CYN}${LAUNCHER_PATH}${CRS}\tLauncher location" echo -e "\t${CYN}${SCRIPT_PATH}${CRS}\t\t\tScript location\n" + echo -e "\t${CYN}${LOG_PATH}${CRS}\t\tLog location\n" } ### EXIT CLEAN @@ -207,7 +214,7 @@ exit_clean() { ########## MAIN ########## ## GET OPTIONS -while getopts ":a,:s,:S,:h" OPTION ; do +while getopts ":a,:s,:S,:L,:h" OPTION ; do case $OPTION in S) @@ -219,6 +226,10 @@ while getopts ":a,:s,:S,:h" OPTION ; do script_version exit_clean ;; + L) + show_log + exit_clean ;; + h) help exit_clean ;; diff --git a/helium_helper.sh b/helium_helper.sh index 2217b41..c51ba1f 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -20,7 +20,7 @@ SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.6" +SCRIPT_VERSION="0.5.5" ALIAS="update-helium" ## LOCATIONS @@ -144,6 +144,7 @@ add_launcher() { sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%QUIET_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template sed -i "s|%SCRIPT_UPDATE%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -S|" $TMP/helium.desktop.template + sed -i "s|%OPEN_LOG_EDITOR%|xdg-open $LOG|" $TMP/helium.desktop.template mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" @@ -292,7 +293,14 @@ remove_helium() { rm -rf $INSTALL_PATH if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then rm $LAUNCHER_PATH/$APP_NAME.desktop - + fi + + if [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then + rm $SCRIPT_PATH/$SCRIPT_FILE_NAME + fi + + if [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then + rm $SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME fi if [ -f "$HOME/.zshrc" ] ; then From d1da40494bbfdeaa71943ce9f6fcab0668c5f69a Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 12:07:28 +0100 Subject: [PATCH 44/63] Log view function extended --- helium_auto_update.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index a7d8ecf..e06b9cd 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -181,7 +181,13 @@ script_version() { ### SHOW LOG show_log() { - xdg-open $LOG + if [ -f "$LOG" ] ; then + xdg-open $LOG + + else + notify-send -i "$ICON" "Helium Helper" "No log created yet" + + fi } ### HELP From 4f1d453e9ee42303f60ef2d39f300ded358617f6 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 12:34:17 +0100 Subject: [PATCH 45/63] More accessible url variables --- helium_auto_update.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index e06b9cd..8077325 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -25,6 +25,8 @@ LAUNCHER_PATH=$HOME/.local/share/applications ICON=$CONFIG_PATH/icon/helium.png SCRIPT_PATH=$HOME/.local/bin DATE=$(date) +REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME +SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest ########## FUNCTIONS ########### @@ -49,6 +51,7 @@ dependency_check () { if ! [ -d "$LOG_PATH" ] ; then mkdir -p $LOG_PATH + echo "########## $APP_NAME update log ##########" echo "${DATE} | Log created" >> $LOG fi @@ -75,8 +78,6 @@ dependency_check () { ### UPDATE SCRIPT update_script() { - REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME - ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo "${DATE} | Failed to update script - local file not found" >> $LOG @@ -85,7 +86,7 @@ update_script() { fi - REMOTE_SCRIPT_VERSION=$(curl -s https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME | grep -m 1 "SCRIPT_VERSION" | tr -d 'SCRIPT_VERSION="') + REMOTE_SCRIPT_VERSION=$(curl -s $REMOTE_SCRIPT_URL | grep -m 1 "SCRIPT_VERSION" | tr -d 'SCRIPT_VERSION="') ### CHECK FOR EMPTY VERSION TAGS if [ -z "$SCRIPT_VERSION" ] ; then @@ -125,11 +126,13 @@ update_script() { ### UPDATE update_helium() { + DOWNLOAD_URL=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') + SOURCE_FILENAME=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}') + SOURCE_VERSION=$(curl -s $SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS - if [[ -z "$GIT_VERSION" ]] ; then + if [[ -z "$SOURCE_VERSION" ]] ; then echo "${DATE} | Failed to update - Empty version tag --> $SOURCE" >> $LOG notify-send -i "$ICON" "Helium Helper" "Browser update failed! See log for details" exit @@ -143,26 +146,24 @@ update_helium() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) - GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .) + SOURCE_VERSION_NUM=$(echo $SOURCE_VERSION | tr -d .) - if [ "$GIT_VERSION" == "$LOCAL_VERSION" ] ; then + if [ "$SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then notify-send -i "$ICON" "Helium Helper" "Browser is up-to-date" - elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then - GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + elif [ "$SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then mkdir -p $TMP $BACKUP_PATH - wget -P $TMP $GIT_URL -q --show-progress - chmod +x $TMP/$GIT_FILENAME + wget -P $TMP $DOWNLOAD_URL -q --show-progress + chmod +x $TMP/$SOURCE_FILENAME if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then rm $BACKUP_PATH/$APP_NAME.old fi mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old - mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop - echo "${DATE} | $APP_NAME updated to ${GIT_VERSION}" >> $LOG - notify-send -i "$ICON" "Helium Helper" "Browser updated to $GIT_VERSION" + echo "${DATE} | $APP_NAME updated to ${SOURCE_VERSION}" >> $LOG + notify-send -i "$ICON" "Helium Helper" "Browser updated to $SOURCE_VERSION" else echo "${DATE} | Failed to update - Version tags malformed" >> $LOG From 62d0671f031ac0091371446aa87f20b5ae53e92b Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 12:51:52 +0100 Subject: [PATCH 46/63] Fixed missing variable --- helium_helper.sh | 61 ++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index c51ba1f..67533d1 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -32,7 +32,10 @@ LOG_PATH=$INSTALL_PATH/assets/logs LOG=$LOG_PATH/log LAUNCHER_PATH=$HOME/.local/share/applications SCRIPT_PATH=$HOME/.local/bin -#PROFILE=$HOME/.profile ### for AUTO UPDATE + +## REMOTE LOCATIONS +REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME +SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest ########## FUNCTIONS ########### @@ -92,12 +95,12 @@ install_helium() { echo if [[ "$CONFIRM_INSTALL" == "" || "$CONFIRM_INSTALL" == "y" || "$CONFIRM_INSTALL" == "Y" ]] ; then - GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') - wget -P $TMP $GIT_URL -q --show-progress - chmod +x $TMP/$GIT_FILENAME + DOWNLOAD_URL=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') + SOURCE_FILENAME=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + wget -P $TMP $DOWNLOAD_URL -q --show-progress + chmod +x $TMP/$SOURCE_FILENAME mkdir -p $INSTALL_PATH - mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage add_launcher echo -e "\n ${GRN}$APP_NAME_LONG is installed!${CRS}\n" break @@ -173,7 +176,7 @@ add_launcher() { add_alias() { ### WORKS BUT NEEDS WORK if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then mkdir -p $SCRIPT_PATH - wget -P $TMP $SCRIPT_URL -q + wget -P $TMP $REMOTE_SCRIPT_URL -q chmod +x $TMP/$SCRIPT_FILE_NAME mv $TMP/$SCRIPT_FILE_NAME $SCRIPT_PATH fi @@ -203,10 +206,10 @@ add_alias() { ### WORKS BUT NEEDS WORK ### UPDATE update_helium() { LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}') + SOURCE_VERSION=$(curl -s $SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS - if [ -z "$GIT_VERSION" ] ; then + if [ -z "$SOURCE_VERSION" ] ; then echo -e "\n ${RED}Empty version tag from ${CYN}$SOURCE${RED}! Can't compare, exiting...${CRS}" exit @@ -218,31 +221,31 @@ update_helium() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) - GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .) + SOURCE_VERSION_NUM=$(echo $SOURCE_VERSION | tr -d .) - if [ "$GIT_VERSION" == "$LOCAL_VERSION" ] ; then + if [ "$SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then echo -e "\n ${GRN}$APP_NAME_LONG is already up-to-date!${CRS}\n" - elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ "$SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then echo -e "\n ${LCY}$APP_NAME_LONG is updatable!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n" + echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" while true ; do read -p " Download and update $APP_NAME_LONG from $SOURCE? (Y/n) : " CONFIRM echo if [[ "$CONFIRM" == "" || "$CONFIRM" == "y" || "$CONFIRM" == "Y" ]] ; then - GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + DOWNLOAD_URL=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') + SOURCE_FILENAME=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') mkdir -p $TMP $BACKUP_PATH - wget -P $TMP $GIT_URL -q --show-progress - chmod +x $TMP/$GIT_FILENAME + wget -P $TMP $DOWNLOAD_URL -q --show-progress + chmod +x $TMP/$SOURCE_FILENAME if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then rm $BACKUP_PATH/$APP_NAME.old fi mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old - mv $TMP/$GIT_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date !${CRS}\n" @@ -262,7 +265,7 @@ update_helium() { else echo -e "\n ${RED}Version tags malformed or you are using a Beta version!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n" + echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" echo -e " ${RED}Update failed... Exiting...${CRS}\n" exit @@ -341,8 +344,6 @@ script_version() { ### UPDATE SCRIPT update_script() { - REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME - ### CHECK FOR LOCAL SCRIPT if ! [ -f "$SCRIPT_PATH/$SCRIPT_FILE_NAME" ] ; then echo -e "\n ${YEL}$SCRIPT_FILE_NAME not found...${CRS}" @@ -375,7 +376,7 @@ update_script() { fi - REMOTE_SCRIPT_VERSION=$(curl -s https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME | grep -m 1 "SCRIPT_VERSION" | tr -d 'SCRIPT_VERSION="') + REMOTE_SCRIPT_VERSION=$(curl -s $REMOTE_SCRIPT_URL | grep -m 1 "SCRIPT_VERSION" | tr -d 'SCRIPT_VERSION="') ### CHECK FOR EMPTY VERSION TAGS if [ -z "$SCRIPT_VERSION" ] ; then @@ -439,10 +440,10 @@ update_script() { ### COMPARE APPIMAGE VERSION compare_version() { LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}') + SOURCE_VERSION=$(curl -s $SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS - if [ -z "$GIT_VERSION" ] ; then + if [ -z "$SOURCE_VERSION" ] ; then echo -e "\n ${RED}Empty version tag from ${CYN}$SOURCE${RED}! Can't compare, exiting...${CRS}" exit @@ -454,24 +455,24 @@ compare_version() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) - GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .) + SOURCE_VERSION_NUM=$(echo $SOURCE_VERSION | tr -d .) - if [ "$GIT_VERSION" == "$LOCAL_VERSION" ] ; then + if [ "$SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n" + echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" exit - elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ "$SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then echo -e "\n ${YEL}$APP_NAME_LONG is updatable!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n" + echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" exit else echo -e "\n ${RED}Version tags malformed or you are using a Beta version!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n" + echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" echo -e " ${RED}Update failed ... Exiting ...${CRS}\n" exit From f072d0608cd128a2d92924e170103a5c339f8ec7 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 12:52:09 +0100 Subject: [PATCH 47/63] update --- helium_auto_update.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 8077325..ad335bc 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -25,6 +25,8 @@ LAUNCHER_PATH=$HOME/.local/share/applications ICON=$CONFIG_PATH/icon/helium.png SCRIPT_PATH=$HOME/.local/bin DATE=$(date) + +## REMOTE LOCATIONS REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest From a97e77a370983b5b4fc2b53d20a21ec396006591 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 12:58:40 +0100 Subject: [PATCH 48/63] Fixed SED command --- helium_helper.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_helper.sh b/helium_helper.sh index 67533d1..0014d4f 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -147,7 +147,7 @@ add_launcher() { sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%QUIET_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template sed -i "s|%SCRIPT_UPDATE%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -S|" $TMP/helium.desktop.template - sed -i "s|%OPEN_LOG_EDITOR%|xdg-open $LOG|" $TMP/helium.desktop.template + sed -i "s|%OPEN_LOG_EDITOR%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -L|" $TMP/helium.desktop.template mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop mv $TMP/helium.png $CONFIG_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" From 1a3927e68941ed908d9761b88953d64ec0870d52 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 13:05:22 +0100 Subject: [PATCH 49/63] Logging changed --- helium_auto_update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index ad335bc..6fba924 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -53,7 +53,8 @@ dependency_check () { if ! [ -d "$LOG_PATH" ] ; then mkdir -p $LOG_PATH - echo "########## $APP_NAME update log ##########" + echo "########## $APP_NAME_LONG update log ##########" >> $LOG + echo >> $LOG echo "${DATE} | Log created" >> $LOG fi From 99755d40fc74f30184df7d60dbd62dbf06819272 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 13:10:09 +0100 Subject: [PATCH 50/63] update --- helium_auto_update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helium_auto_update.sh b/helium_auto_update.sh index 6fba924..46d7254 100755 --- a/helium_auto_update.sh +++ b/helium_auto_update.sh @@ -51,7 +51,7 @@ dependency_check () { done - if ! [ -d "$LOG_PATH" ] ; then + if ! [ -f "$LOG" ] ; then mkdir -p $LOG_PATH echo "########## $APP_NAME_LONG update log ##########" >> $LOG echo >> $LOG From c1ec805b1bea0adefae0d3c44a865ef1282ffcc5 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 14:25:16 +0100 Subject: [PATCH 51/63] Version bumped up --- helium_helper.sh | 27 +++++++------- ...uto_update.sh => helium_launcher_update.sh | 35 +++++++++++-------- todo.md | 22 ++++++++---- 3 files changed, 49 insertions(+), 35 deletions(-) rename helium_auto_update.sh => helium_launcher_update.sh (87%) diff --git a/helium_helper.sh b/helium_helper.sh index 0014d4f..c7c90f1 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -19,22 +19,23 @@ APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" -AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.5" +AUTO_SCRIPT_FILE_NAME="helium_launcher_update.sh" +SCRIPT_VERSION="0.5.6" ALIAS="update-helium" ## LOCATIONS TMP=/tmp/$APP_NAME INSTALL_PATH=$HOME/.apps/$APP_NAME -CONFIG_PATH=$INSTALL_PATH/assets -BACKUP_PATH=$INSTALL_PATH/assets/backup -LOG_PATH=$INSTALL_PATH/assets/logs +ASSET_PATH=$INSTALL_PATH/assets +BACKUP_PATH=$ASSET_PATH/backup +LOG_PATH=$ASSET_PATH/logs LOG=$LOG_PATH/log LAUNCHER_PATH=$HOME/.local/share/applications SCRIPT_PATH=$HOME/.local/bin ## REMOTE LOCATIONS -REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME +REMOTE_REPO_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main +REMOTE_SCRIPT_URL=$REMOTE_REPO_URL/$SCRIPT_FILE_NAME SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest ########## FUNCTIONS ########### @@ -129,11 +130,11 @@ add_launcher() { echo if [[ "$CONFIRM_LAUNCHER" == "" || "$CONFIRM_LAUNCHER" == "y" || "$CONFIRM_LAUNCHER" == "Y" ]] ; then - LAUNCHER_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/launcher/helium.desktop.template - ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/icon/helium.png - AUTO_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$AUTO_SCRIPT_FILE_NAME + LAUNCHER_URL=$REMOTE_REPO_URL/assets/launcher/helium.desktop.template + ICON_URL=$REMOTE_REPO_URL/assets/icon/helium.png + AUTO_SCRIPT_URL=$REMOTE_REPO_URL/$AUTO_SCRIPT_FILE_NAME LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $CONFIG_PATH/icon + mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $ASSET_PATH/icon if ! [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress chmod +x $TMP/$AUTO_SCRIPT_FILE_NAME @@ -143,13 +144,13 @@ add_launcher() { wget -P $TMP $LAUNCHER_URL -q --show-progress wget -P $TMP $ICON_URL -q --show-progress sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.AppImage|" $TMP/helium.desktop.template - sed -i "s|%ICON_LOCATION%|$CONFIG_PATH/icon/helium.png|" $TMP/helium.desktop.template + sed -i "s|%ICON_LOCATION%|$ASSET_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%QUIET_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template sed -i "s|%SCRIPT_UPDATE%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -S|" $TMP/helium.desktop.template sed -i "s|%OPEN_LOG_EDITOR%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME -L|" $TMP/helium.desktop.template mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop - mv $TMP/helium.png $CONFIG_PATH/icon + mv $TMP/helium.png $ASSET_PATH/icon echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}" break @@ -273,7 +274,7 @@ update_helium() { } -### AUTOMATIC UPDATE --> TO DO +### AUTOMATIC UPDATE --> TO DO? auto_update() { if ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then echo -e "\n ${RED}$APP_NAME AppImage not found! Can't add auto update script...${CRS}" diff --git a/helium_auto_update.sh b/helium_launcher_update.sh similarity index 87% rename from helium_auto_update.sh rename to helium_launcher_update.sh index 46d7254..8e18c01 100755 --- a/helium_auto_update.sh +++ b/helium_launcher_update.sh @@ -9,25 +9,26 @@ set -e APP_NAME="Helium" APP_NAME_LONG="Helium Web Browser" SOURCE="GitHub" -SCRIPT_NAME="$APP_NAME quiet updater" -SCRIPT_FILE_NAME="helium_auto_update.sh" -SCRIPT_VERSION="0.5.5" +SCRIPT_NAME="$APP_NAME launcher updater" +SCRIPT_FILE_NAME="helium_launcher_update.sh" +SCRIPT_VERSION="0.5.6" ALIAS="auto-update-helium" +DATE=$(date) ## LOCATIONS TMP=/tmp/$APP_NAME INSTALL_PATH=$HOME/.apps/$APP_NAME -CONFIG_PATH=$INSTALL_PATH/assets -BACKUP_PATH=$INSTALL_PATH/assets/backup -LOG_PATH=$INSTALL_PATH/assets/logs +ASSET_PATH=$INSTALL_PATH/assets +BACKUP_PATH=$ASSET_PATH/backup +LOG_PATH=$ASSET_PATH/logs LOG=$LOG_PATH/log LAUNCHER_PATH=$HOME/.local/share/applications -ICON=$CONFIG_PATH/icon/helium.png +ICON=$ASSET_PATH/icon/helium.png SCRIPT_PATH=$HOME/.local/bin -DATE=$(date) ## REMOTE LOCATIONS -REMOTE_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$SCRIPT_FILE_NAME +REMOTE_REPO_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main +REMOTE_SCRIPT_URL=$REMOTE_REPO_URL/$SCRIPT_FILE_NAME SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest ########## FUNCTIONS ########### @@ -62,6 +63,7 @@ dependency_check () { if [ -f "$TMP/missingDeps" ] ; then MISSING=$(cat $TMP/missingDeps) echo "${DATE} | Failed to update - missing dependencies : $MISSING" >> $LOG + notify-send -i "$ICON" "Helium Helper" "Update failed! See log for details" exit_clean fi @@ -69,10 +71,12 @@ dependency_check () { if ! [ -d "$INSTALL_PATH" ] ; then mkdir -p $INSTALL_PATH echo "${DATE} | Failed to update - $APP_NAME installation path not present - But created for logging" >> $LOG + notify-send -i "$ICON" "Helium Helper" "Update failed! See log for details" exit elif ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then echo "${DATE} | Failed to update - Local $APP_NAME AppImage not found" >> $LOG + notify-send -i "$ICON" "Helium Helper" "Update failed! See log for details" exit fi @@ -196,8 +200,9 @@ show_log() { ### HELP help() { - echo -e "\n${LCY}${SCRIPT_NAME}${CRS}\n" - echo -e "$APP_NAME_LONG automatic updater script\n" + echo -e "\n${LCY}$SCRIPT_NAME${CRS}\n" + echo -e "$APP_NAME_LONG launcher updater script\n" + echo -e "Description: Add functionality to $APP_NAME_LONG's launcher\n" echo -e "Syntax: $SCRIPT_FILE_NAME [ -s | -S | -L | -h ]\n" echo -e "Options:\n" echo -e "\t-s\tShow script version" @@ -205,10 +210,10 @@ help() { echo -e "\t-L\tOpen log in default text editor" echo -e "\t-h\tPrint this help page.\n" echo -e "Configured locations:\n" - echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location" - echo -e "\t${CYN}${LAUNCHER_PATH}${CRS}\tLauncher location" - echo -e "\t${CYN}${SCRIPT_PATH}${CRS}\t\t\tScript location\n" - echo -e "\t${CYN}${LOG_PATH}${CRS}\t\tLog location\n" + echo -e "\t${CYN}$INSTALL_PATH${CRS}\t\tInstall location" + echo -e "\t${CYN}$LOG_PATH${CRS}\tLog location" + echo -e "\t${CYN}$LAUNCHER_PATH${CRS}\tLauncher location" + echo -e "\t${CYN}$SCRIPT_PATH${CRS}\t\t\tScript location\n" } ### EXIT CLEAN diff --git a/todo.md b/todo.md index fd46dc7..e7d063a 100644 --- a/todo.md +++ b/todo.md @@ -7,19 +7,27 @@ - Launcher installer refined - Clean Up - Script updater + - Remote script check simplified +- Remover function extended + - Alias remover added + - Script remover added +- helium_auto_update.sh renamed to helium_launcher_update.sh +- Desktop notifications added +- Launcher functions extended + - Update script option added + - Show log option added +- Variables universalized +- Wiki created -## Add -- Internet connectivity check in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) -- Auto update setup - - shell recognition missing +## Add/To Do - Architecture detection - Set alias --> Partially - shell recognition missing - Roll back from backup - Config check -- Desktop notifications in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh) -- Log viewer & config editor -- Add alias remover to remover function +- Simplification & Clean Up +- Update Readme +- Make functional launcher optional ## Repo - Merge workflow From 5aa8ee19157dfd2f81040f856c3f80d716c21675 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 15:17:00 +0100 Subject: [PATCH 52/63] Readme update --- README.md | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 14d237a..b141651 100644 --- a/README.md +++ b/README.md @@ -1,19 +1,35 @@ # Helium Bowser installer & updater +## Purpose +This script was initially designed to just update my Helium browser but over time and interest it got more functional and universal. With "little" tinkering it should be possible to apply this script to install, update & configure many kinds of releases from source like AppImages, binaries, etc... ## Overview ### Helium_Helper.sh -- Interactive installer and updater script +- Interactive installer, updater & configuration script - Installs to `/home//.apps/Helium` | changeable in line 28 `INSTALL_PATH` - Assumes: - Presence of `/home//.apps/Helium` when updating | changeable in line 28 `INSTALL_PATH` - - Executable named `Helium.AppImage` | for convenience so launchers don't have to be edited at each update -- Keeps prior AppImage as `Helium.old` which will be replaced at every update + - Executable named `Helium.AppImage` +- Keeps backups of + - `Helium.AppImage` --> `Helium.AppImage.old` + - `helium_helper.sh` --> `helium_helper.sh.old` + - `helium_launcher_update.sh` --> `helium_launcher_update.sh.old` + - `Helium.desktop` --> `Helium.desktop.old` + which will be overwritten at every update - Adds desktop launcher to `/home//.local/share/applications` - -### Helium_Auto_Update.sh -- Automatic updater script -- Installs to `/home//.apps/Helium` | changeable in line 8 `INSTALL_PATH` +- Adds options to launcher which are run by `helium_launcher_updater.sh` + - Update Helium + - Update Script + - View Log +- Run `helium_helper.sh -h` for help +--- +### Helium_Launcher_Update.sh +- Update Helium from launcher - Assumes: - - Presence of `/home//.apps/Helium` when updating | changeable in line 8 `INSTALL_PATH` - - Executable named `helium-browser.AppImage` | for convenience so launchers don't have to be edited at each update -- Loggs to `/home//.apps/Helium/updateLog` -- Keeps prior AppImage as `helium-browser.OldAppImage` which will be replaced at every update + - Presence of `/home//.apps/Helium` when updating | changeable in line 19 `INSTALL_PATH` + - Executable named `Helium.AppImage` +- Loggs to `/home//.apps/Helium/assets/logs` +- Keeps backups of + - `Helium.AppImage` --> `Helium.AppImage.old` + - `helium_helper.sh` --> `helium_helper.sh.old` + - `helium_launcher_update.sh` --> `helium_launcher_update.sh.old` + - `Helium.desktop` --> `Helium.desktop.old` + which will be overwritten at every update From f79c997f16f7b69abfda6b653b4008bf05dcb8de Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 15:17:22 +0100 Subject: [PATCH 53/63] Alias removed --- helium_launcher_update.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/helium_launcher_update.sh b/helium_launcher_update.sh index 8e18c01..35a5500 100755 --- a/helium_launcher_update.sh +++ b/helium_launcher_update.sh @@ -12,7 +12,6 @@ SOURCE="GitHub" SCRIPT_NAME="$APP_NAME launcher updater" SCRIPT_FILE_NAME="helium_launcher_update.sh" SCRIPT_VERSION="0.5.6" -ALIAS="auto-update-helium" DATE=$(date) ## LOCATIONS @@ -162,10 +161,10 @@ update_helium() { mkdir -p $TMP $BACKUP_PATH wget -P $TMP $DOWNLOAD_URL -q --show-progress chmod +x $TMP/$SOURCE_FILENAME - if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then - rm $BACKUP_PATH/$APP_NAME.old + if [ -f "$BACKUP_PATH/$APP_NAME.AppImage.old" ] ; then + rm $BACKUP_PATH/$APP_NAME.AppImage.old fi - mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old + mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.AppImage.old mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop From 0bdf836eb3fab31a48ce2e5f8d7a8f80394e9720 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 15:21:24 +0100 Subject: [PATCH 54/63] Readme update --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index b141651..ac7a87d 100644 --- a/README.md +++ b/README.md @@ -33,3 +33,4 @@ This script was initially designed to just update my Helium browser but over tim - `helium_launcher_update.sh` --> `helium_launcher_update.sh.old` - `Helium.desktop` --> `Helium.desktop.old` which will be overwritten at every update +- Run `helium_launcher_update.sh -h` for help \ No newline at end of file From 2d8c2546218dcc0cea92c540ef79b94ec5ea2728 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 18:53:36 +0100 Subject: [PATCH 55/63] update --- helium_launcher_update.sh | 2 +- todo.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helium_launcher_update.sh b/helium_launcher_update.sh index 35a5500..f7f194d 100755 --- a/helium_launcher_update.sh +++ b/helium_launcher_update.sh @@ -264,4 +264,4 @@ dependency_check update_helium ## CLEAN -exit_clean \ No newline at end of file +exit_clean diff --git a/todo.md b/todo.md index e7d063a..0a260d2 100644 --- a/todo.md +++ b/todo.md @@ -25,7 +25,7 @@ - shell recognition missing - Roll back from backup - Config check -- Simplification & Clean Up +- Simplification (more for loops) & Clean Up - Update Readme - Make functional launcher optional From 17d2815039839b1203531e1b0ff6d01342acfb77 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 22:30:02 +0100 Subject: [PATCH 56/63] Fixed faulty sed command in removal function --- helium_helper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index c7c90f1..f809ae6 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -308,10 +308,10 @@ remove_helium() { fi if [ -f "$HOME/.zshrc" ] ; then - sed -i "s|$ALIAS|d|" $HOME/.zshrc + sed -i "/$ALIAS/d" $HOME/.zshrc elif [ -f "$HOME/.bashrc" ] ; then - sed -i "s|$ALIAS|d|" $HOME/.bashrc + sed -i "/$ALIAS/d" $HOME/.bashrc fi From 75c5bffbe9243876f471e6b3e51748cd39b40abc Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 23:33:01 +0100 Subject: [PATCH 57/63] Multiple variables added --- helium_helper.sh | 90 ++++++++++++++++++++------------------- helium_launcher_update.sh | 49 +++++++++++---------- 2 files changed, 72 insertions(+), 67 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index f809ae6..d18c3f0 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -1,7 +1,6 @@ #!/bin/bash # Helium BOWSER INSTALL & UPDATE SCRIPT ---> INTERACTIVE - ########## PREREQUISITES ########### set -e @@ -16,7 +15,9 @@ CRS="\e[0m" ## GLOBAL VARIABLES APP_NAME="Helium" APP_NAME_LONG="Helium Web Browser" -SOURCE="GitHub" +ARCH="x86_64" +FILE_EXTENSION="AppImage" +APP_SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" AUTO_SCRIPT_FILE_NAME="helium_launcher_update.sh" @@ -34,9 +35,10 @@ LAUNCHER_PATH=$HOME/.local/share/applications SCRIPT_PATH=$HOME/.local/bin ## REMOTE LOCATIONS -REMOTE_REPO_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main +REMOTE_REPO_BRANCH="main" +REMOTE_REPO_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/$REMOTE_REPO_BRANCH REMOTE_SCRIPT_URL=$REMOTE_REPO_URL/$SCRIPT_FILE_NAME -SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest +APP_SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest ########## FUNCTIONS ########### @@ -74,8 +76,8 @@ local_check() { install_helium exit - elif ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then - echo -e "\n ${RED}$APP_NAME_LONG directory found but no executable named ${CYN}$APP_NAME.AppImage${RED}!${CRS}" + elif ! [ -f "$INSTALL_PATH/$APP_NAME.$FILE_EXTENSION" ] ; then + echo -e "\n ${RED}$APP_NAME_LONG directory found but no executable named ${CYN}$APP_NAME.$FILE_EXTENSION${RED}!${CRS}" install_helium exit @@ -84,7 +86,7 @@ local_check() { ### INSTALL install_helium() { - if [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then + if [ -f "$INSTALL_PATH/$APP_NAME.$FILE_EXTENSION" ] ; then echo -e "\n ${YEL}$APP_NAME_LONG AppImage found! Trying to update...${CRS}" update_helium exit @@ -92,16 +94,16 @@ install_helium() { fi while true ; do - read -p " Download and install $APP_NAME_LONG from $SOURCE? (Y/n) : " CONFIRM_INSTALL + read -p " Download and install $APP_NAME_LONG from $APP_SOURCE? (Y/n) : " CONFIRM_INSTALL echo if [[ "$CONFIRM_INSTALL" == "" || "$CONFIRM_INSTALL" == "y" || "$CONFIRM_INSTALL" == "Y" ]] ; then - DOWNLOAD_URL=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - SOURCE_FILENAME=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + DOWNLOAD_URL=$(curl -s $APP_SOURCE_URL | grep "browser_download_url" | grep "$ARCH.$FILE_EXTENSION" | grep -v "zsync" | tr -d \" | awk '{print $2}') + APP_SOURCE_FILENAME=$(curl -s $APP_SOURCE_URL | grep "browser_download_url" | grep "$ARCH.$FILE_EXTENSION" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') wget -P $TMP $DOWNLOAD_URL -q --show-progress - chmod +x $TMP/$SOURCE_FILENAME + chmod +x $TMP/$APP_SOURCE_FILENAME mkdir -p $INSTALL_PATH - mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + mv $TMP/$APP_SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.$FILE_EXTENSION add_launcher echo -e "\n ${GRN}$APP_NAME_LONG is installed!${CRS}\n" break @@ -123,7 +125,7 @@ add_launcher() { if [ -f "$LAUNCHER_PATH/$APP_NAME.desktop" ] ; then echo -e "\n ${YEL}${APP_NAME}.desktop already exists!${CRS}" - elif [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then + elif [ -f "$INSTALL_PATH/$APP_NAME.$FILE_EXTENSION" ] ; then while true ; do echo read -p " Add $APP_NAME_LONG launcher to $LAUNCHER_PATH? (Y/n) : " CONFIRM_LAUNCHER @@ -133,7 +135,7 @@ add_launcher() { LAUNCHER_URL=$REMOTE_REPO_URL/assets/launcher/helium.desktop.template ICON_URL=$REMOTE_REPO_URL/assets/icon/helium.png AUTO_SCRIPT_URL=$REMOTE_REPO_URL/$AUTO_SCRIPT_FILE_NAME - LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') + LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.$FILE_EXTENSION --version | awk '{print $2}') mkdir -p $LAUNCHER_PATH $SCRIPT_PATH $BACKUP_PATH $ASSET_PATH/icon if ! [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress @@ -143,7 +145,7 @@ add_launcher() { wget -P $TMP $LAUNCHER_URL -q --show-progress wget -P $TMP $ICON_URL -q --show-progress - sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.AppImage|" $TMP/helium.desktop.template + sed -i "s|%APP_LOCATION%|$INSTALL_PATH/$APP_NAME.$FILE_EXTENSION|" $TMP/helium.desktop.template sed -i "s|%ICON_LOCATION%|$ASSET_PATH/icon/helium.png|" $TMP/helium.desktop.template sed -i "s|%APP_VERSION%|$LOCAL_VERSION|" $TMP/helium.desktop.template sed -i "s|%QUIET_UPDATE_SCRIPT%|$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME|" $TMP/helium.desktop.template @@ -206,12 +208,12 @@ add_alias() { ### WORKS BUT NEEDS WORK ### UPDATE update_helium() { - LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - SOURCE_VERSION=$(curl -s $SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') + LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.$FILE_EXTENSION --version | awk '{print $2}') + APP_SOURCE_VERSION=$(curl -s $APP_SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS - if [ -z "$SOURCE_VERSION" ] ; then - echo -e "\n ${RED}Empty version tag from ${CYN}$SOURCE${RED}! Can't compare, exiting...${CRS}" + if [ -z "$APP_SOURCE_VERSION" ] ; then + echo -e "\n ${RED}Empty version tag from ${CYN}$APP_SOURCE${RED}! Can't compare, exiting...${CRS}" exit elif [ -z "$LOCAL_VERSION" ] ; then @@ -222,33 +224,33 @@ update_helium() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) - SOURCE_VERSION_NUM=$(echo $SOURCE_VERSION | tr -d .) + APP_SOURCE_VERSION_NUM=$(echo $APP_SOURCE_VERSION | tr -d .) - if [ "$SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then + if [ "$APP_SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then echo -e "\n ${GRN}$APP_NAME_LONG is already up-to-date!${CRS}\n" - elif [ "$SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ "$APP_SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then echo -e "\n ${LCY}$APP_NAME_LONG is updatable!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" + echo -e " ${CYN}$APP_SOURCE Version :\t${CRS}${APP_SOURCE_VERSION}\n" while true ; do - read -p " Download and update $APP_NAME_LONG from $SOURCE? (Y/n) : " CONFIRM + read -p " Download and update $APP_NAME_LONG from $APP_SOURCE? (Y/n) : " CONFIRM echo if [[ "$CONFIRM" == "" || "$CONFIRM" == "y" || "$CONFIRM" == "Y" ]] ; then - DOWNLOAD_URL=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - SOURCE_FILENAME=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + DOWNLOAD_URL=$(curl -s $APP_SOURCE_URL | grep "browser_download_url" | grep "$ARCH.$FILE_EXTENSION" | grep -v "zsync" | tr -d \" | awk '{print $2}') + APP_SOURCE_FILENAME=$(curl -s $APP_SOURCE_URL | grep "browser_download_url" | grep "$ARCH.$FILE_EXTENSION" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') mkdir -p $TMP $BACKUP_PATH wget -P $TMP $DOWNLOAD_URL -q --show-progress - chmod +x $TMP/$SOURCE_FILENAME + chmod +x $TMP/$APP_SOURCE_FILENAME if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then rm $BACKUP_PATH/$APP_NAME.old fi - mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.old - mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + mv $INSTALL_PATH/$APP_NAME.$FILE_EXTENSION $BACKUP_PATH/$APP_NAME.old + mv $TMP/$APP_SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.$FILE_EXTENSION cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old - sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop + sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.$FILE_EXTENSION --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date !${CRS}\n" break @@ -266,7 +268,7 @@ update_helium() { else echo -e "\n ${RED}Version tags malformed or you are using a Beta version!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" + echo -e " ${CYN}$APP_SOURCE Version :\t${CRS}${APP_SOURCE_VERSION}\n" echo -e " ${RED}Update failed... Exiting...${CRS}\n" exit @@ -276,7 +278,7 @@ update_helium() { ### AUTOMATIC UPDATE --> TO DO? auto_update() { - if ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then + if ! [ -f "$INSTALL_PATH/$APP_NAME.$FILE_EXTENSION" ] ; then echo -e "\n ${RED}$APP_NAME AppImage not found! Can't add auto update script...${CRS}" exit @@ -440,12 +442,12 @@ update_script() { ### COMPARE APPIMAGE VERSION compare_version() { - LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - SOURCE_VERSION=$(curl -s $SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') + LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.$FILE_EXTENSION --version | awk '{print $2}') + APP_SOURCE_VERSION=$(curl -s $APP_SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS - if [ -z "$SOURCE_VERSION" ] ; then - echo -e "\n ${RED}Empty version tag from ${CYN}$SOURCE${RED}! Can't compare, exiting...${CRS}" + if [ -z "$APP_SOURCE_VERSION" ] ; then + echo -e "\n ${RED}Empty version tag from ${CYN}$APP_SOURCE${RED}! Can't compare, exiting...${CRS}" exit elif [ -z "$LOCAL_VERSION" ] ; then @@ -456,24 +458,24 @@ compare_version() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) - SOURCE_VERSION_NUM=$(echo $SOURCE_VERSION | tr -d .) + APP_SOURCE_VERSION_NUM=$(echo $APP_SOURCE_VERSION | tr -d .) - if [ "$SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then + if [ "$APP_SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" + echo -e " ${CYN}$APP_SOURCE Version :\t${CRS}${APP_SOURCE_VERSION}\n" exit - elif [ "$SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ "$APP_SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then echo -e "\n ${YEL}$APP_NAME_LONG is updatable!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" + echo -e " ${CYN}$APP_SOURCE Version :\t${CRS}${APP_SOURCE_VERSION}\n" exit else echo -e "\n ${RED}Version tags malformed or you are using a Beta version!${CRS}\n" echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}" - echo -e " ${CYN}$SOURCE Version :\t${CRS}${SOURCE_VERSION}\n" + echo -e " ${CYN}$APP_SOURCE Version :\t${CRS}${APP_SOURCE_VERSION}\n" echo -e " ${RED}Update failed ... Exiting ...${CRS}\n" exit @@ -486,10 +488,10 @@ help() { echo -e "$APP_NAME_LONG installer & updater script\n" echo -e "Syntax: $SCRIPT_FILE_NAME [ -i | -l | -a | -u | -r | -c | -s | -S | -h ]\n" # | -U | echo -e "Options:\n" - echo -e "\t-i\tDownload & install $APP_NAME_LONG from $SOURCE" + echo -e "\t-i\tDownload & install $APP_NAME_LONG from $APP_SOURCE" echo -e "\t-l\tCreate desktop launcher" echo -e "\t-a\tCreate alias for $SCRIPT_FILE_NAME ${YEL}--> Working with zsh & bash${CRS}" - echo -e "\t-u\tDownload & update $APP_NAME_LONG from $SOURCE" + echo -e "\t-u\tDownload & update $APP_NAME_LONG from $APP_SOURCE" #echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}" echo -e "\t-r\tRemove $APP_NAME_LONG" echo -e "\t-c\tCompare local to remote version" diff --git a/helium_launcher_update.sh b/helium_launcher_update.sh index f7f194d..bd6ce36 100755 --- a/helium_launcher_update.sh +++ b/helium_launcher_update.sh @@ -8,8 +8,10 @@ set -e ## GLOBAL VARIABLES APP_NAME="Helium" APP_NAME_LONG="Helium Web Browser" -SOURCE="GitHub" -SCRIPT_NAME="$APP_NAME launcher updater" +ARCH="x86_64" +FILE_EXTENSION="AppImage" +APP_SOURCE="GitHub" +SCRIPT_NAME="$APP_NAME Launcher Updater" SCRIPT_FILE_NAME="helium_launcher_update.sh" SCRIPT_VERSION="0.5.6" DATE=$(date) @@ -26,9 +28,10 @@ ICON=$ASSET_PATH/icon/helium.png SCRIPT_PATH=$HOME/.local/bin ## REMOTE LOCATIONS -REMOTE_REPO_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main +REMOTE_REPO_BRANCH="main" +REMOTE_REPO_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/$REMOTE_REPO_BRANCH REMOTE_SCRIPT_URL=$REMOTE_REPO_URL/$SCRIPT_FILE_NAME -SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest +APP_SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest ########## FUNCTIONS ########### @@ -73,7 +76,7 @@ dependency_check () { notify-send -i "$ICON" "Helium Helper" "Update failed! See log for details" exit - elif ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then + elif ! [ -f "$INSTALL_PATH/$APP_NAME.$FILE_EXTENSION" ] ; then echo "${DATE} | Failed to update - Local $APP_NAME AppImage not found" >> $LOG notify-send -i "$ICON" "Helium Helper" "Update failed! See log for details" exit @@ -101,7 +104,7 @@ update_script() { exit elif [ -z "$REMOTE_SCRIPT_VERSION" ] ; then - echo "${DATE} | Failed to update script - Empty version tag --> $SOURCE" >> $LOG + echo "${DATE} | Failed to update script - Empty version tag --> $APP_SOURCE" >> $LOG notify-send -i "$ICON" "Helium Helper" "Script update failed! See log for details" exit @@ -132,14 +135,14 @@ update_script() { ### UPDATE update_helium() { - DOWNLOAD_URL=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}') - SOURCE_FILENAME=$(curl -s $SOURCE_URL | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') - LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}') - SOURCE_VERSION=$(curl -s $SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') + DOWNLOAD_URL=$(curl -s $APP_SOURCE_URL | grep "browser_download_url" | grep "$ARCH.$FILE_EXTENSION" | grep -v "zsync" | tr -d \" | awk '{print $2}') + APP_SOURCE_FILENAME=$(curl -s $APP_SOURCE_URL | grep "browser_download_url" | grep "$ARCH.$FILE_EXTENSION" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}') + LOCAL_VERSION=$($INSTALL_PATH/$APP_NAME.$FILE_EXTENSION --version | awk '{print $2}') + APP_SOURCE_VERSION=$(curl -s $APP_SOURCE_URL | grep "tag_name" | tr -d \", | awk '{print $2}') ### CHECK FOR EMPTY VERSION TAGS - if [[ -z "$SOURCE_VERSION" ]] ; then - echo "${DATE} | Failed to update - Empty version tag --> $SOURCE" >> $LOG + if [[ -z "$APP_SOURCE_VERSION" ]] ; then + echo "${DATE} | Failed to update - Empty version tag --> $APP_SOURCE" >> $LOG notify-send -i "$ICON" "Helium Helper" "Browser update failed! See log for details" exit @@ -152,24 +155,24 @@ update_helium() { ### COMPARE LOCAL & REMOTE VERSION LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .) - SOURCE_VERSION_NUM=$(echo $SOURCE_VERSION | tr -d .) + APP_SOURCE_VERSION_NUM=$(echo $APP_SOURCE_VERSION | tr -d .) - if [ "$SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then + if [ "$APP_SOURCE_VERSION" == "$LOCAL_VERSION" ] ; then notify-send -i "$ICON" "Helium Helper" "Browser is up-to-date" - elif [ "$SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then + elif [ "$APP_SOURCE_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then mkdir -p $TMP $BACKUP_PATH wget -P $TMP $DOWNLOAD_URL -q --show-progress - chmod +x $TMP/$SOURCE_FILENAME - if [ -f "$BACKUP_PATH/$APP_NAME.AppImage.old" ] ; then - rm $BACKUP_PATH/$APP_NAME.AppImage.old + chmod +x $TMP/$APP_SOURCE_FILENAME + if [ -f "$BACKUP_PATH/$APP_NAME.$FILE_EXTENSION.old" ] ; then + rm $BACKUP_PATH/$APP_NAME.$FILE_EXTENSION.old fi - mv $INSTALL_PATH/$APP_NAME.AppImage $BACKUP_PATH/$APP_NAME.AppImage.old - mv $TMP/$SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.AppImage + mv $INSTALL_PATH/$APP_NAME.$FILE_EXTENSION $BACKUP_PATH/$APP_NAME.$FILE_EXTENSION.old + mv $TMP/$APP_SOURCE_FILENAME $INSTALL_PATH/$APP_NAME.$FILE_EXTENSION cp $LAUNCHER_PATH/$APP_NAME.desktop $BACKUP_PATH/$APP_NAME.desktop.old - sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.AppImage --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop - echo "${DATE} | $APP_NAME updated to ${SOURCE_VERSION}" >> $LOG - notify-send -i "$ICON" "Helium Helper" "Browser updated to $SOURCE_VERSION" + sed -i "s|X-AppImage-Version=.*|X-AppImage-Version=$($INSTALL_PATH/$APP_NAME.$FILE_EXTENSION --version | awk '{print $2}')|" $LAUNCHER_PATH/$APP_NAME.desktop + echo "${DATE} | $APP_NAME updated to ${APP_SOURCE_VERSION}" >> $LOG + notify-send -i "$ICON" "Helium Helper" "Browser updated to $APP_SOURCE_VERSION" else echo "${DATE} | Failed to update - Version tags malformed" >> $LOG From 2995cc29b10047e427d2798bd993c9b00c136e66 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sat, 27 Dec 2025 23:33:11 +0100 Subject: [PATCH 58/63] update --- todo.md => devdoc.md | 7 +++++++ 1 file changed, 7 insertions(+) rename todo.md => devdoc.md (93%) diff --git a/todo.md b/devdoc.md similarity index 93% rename from todo.md rename to devdoc.md index 0a260d2..2b74bf0 100644 --- a/todo.md +++ b/devdoc.md @@ -6,6 +6,7 @@ - Launcher has an update option now - Launcher installer refined - Clean Up +--- - Script updater - Remote script check simplified - Remover function extended @@ -18,6 +19,12 @@ - Show log option added - Variables universalized - Wiki created +--- +- sed command fixed in remover +- ARCH variable added +- APP_SOURCE variable changed +- BRANCH variable added +- FILE_EXTENSION variable added ## Add/To Do - Architecture detection From 08982535e7881d3f65413506879c9c3ea65883d0 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sun, 28 Dec 2025 00:18:58 +0100 Subject: [PATCH 59/63] Cleanup --- helium_helper.sh | 1 - helium_launcher_update.sh | 2 -- 2 files changed, 3 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index d18c3f0..480f8a3 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -1,5 +1,4 @@ #!/bin/bash - # Helium BOWSER INSTALL & UPDATE SCRIPT ---> INTERACTIVE ########## PREREQUISITES ########### set -e diff --git a/helium_launcher_update.sh b/helium_launcher_update.sh index bd6ce36..5924756 100755 --- a/helium_launcher_update.sh +++ b/helium_launcher_update.sh @@ -1,7 +1,5 @@ #!/bin/bash - # HELIUM BOWSER AUTO UPDATE SCRIPT WITH LOGGING - ########## PREREQUISITES ########### set -e From 5cc2a379852f50af23d999713438e795bcc003a8 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sun, 28 Dec 2025 00:19:05 +0100 Subject: [PATCH 60/63] update --- README.md | 36 +++++++++++++++++++++++++++++++++++- devdoc.md | 1 + 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ac7a87d..c154eeb 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,40 @@ # Helium Bowser installer & updater ## Purpose -This script was initially designed to just update my Helium browser but over time and interest it got more functional and universal. With "little" tinkering it should be possible to apply this script to install, update & configure many kinds of releases from source like AppImages, binaries, etc... +This script was initially designed to just update my Helium browser but over time and interest it got more functional and universal. It includes functions to install, update, remove, add launcher, etc... + +With "little" tinkering it should be possible to apply this script to install, update & configure many kinds of releases from source, like Debian packages, AppImages, binaries, etc... +## Usage +Help +```sh +./helium_helper.sh -h +``` +### First Install +To initally install Helium browser via this script, download helium_helper.sh and make it executable: +```sh +wget https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/helium_helper.sh && chmod +x helium_helper.sh +``` +Run script with install parameter _-i_ +```sh +./helium_helper.sh -i +``` +Add alias to `.shellrc` | _optional_ +```sh +./helium_helper.sh -a ### ONLY TESTED WITH zsh & bash +``` +--- +### Updating +**From launcher** if added +Checking for the latest version and updating can simply be done for the browser as well as the script by right clicking the app icon and choosing either update option, which will be run by `helium_launcher_update.sh`. This will backup all files that are being updated and write a log. + +**Terminal** +Updating can also be done by running: +```sh +./helium_helper.sh -u ### UPDATE APP +``` +```sh +./helium_helper.sh -S ### UPDATE SCRIPT +``` +Since this script is interactive, it doesn't keep logs. ## Overview ### Helium_Helper.sh - Interactive installer, updater & configuration script diff --git a/devdoc.md b/devdoc.md index 2b74bf0..03b693a 100644 --- a/devdoc.md +++ b/devdoc.md @@ -25,6 +25,7 @@ - APP_SOURCE variable changed - BRANCH variable added - FILE_EXTENSION variable added +- Readme updated ## Add/To Do - Architecture detection From a638306f2f14b4274401702b95327d644df508e6 Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sun, 28 Dec 2025 00:20:53 +0100 Subject: [PATCH 61/63] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c154eeb..08edeb4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Helium Bowser installer & updater ## Purpose -This script was initially designed to just update my Helium browser but over time and interest it got more functional and universal. It includes functions to install, update, remove, add launcher, etc... +This script was initially designed to just update my Helium browser but over time and interest it got more functional and universal. It includes functions to install, update, remove, add launcher, etc... and is distro independent. With "little" tinkering it should be possible to apply this script to install, update & configure many kinds of releases from source, like Debian packages, AppImages, binaries, etc... ## Usage From d480d5c657c9a4458952d7a2f0d168a97897f73f Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sun, 28 Dec 2025 00:25:25 +0100 Subject: [PATCH 62/63] update --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 08edeb4..f6587f6 100644 --- a/README.md +++ b/README.md @@ -23,10 +23,12 @@ Add alias to `.shellrc` | _optional_ ``` --- ### Updating -**From launcher** if added +**From launcher** (if added) + Checking for the latest version and updating can simply be done for the browser as well as the script by right clicking the app icon and choosing either update option, which will be run by `helium_launcher_update.sh`. This will backup all files that are being updated and write a log. **Terminal** + Updating can also be done by running: ```sh ./helium_helper.sh -u ### UPDATE APP @@ -67,4 +69,5 @@ Since this script is interactive, it doesn't keep logs. - `helium_launcher_update.sh` --> `helium_launcher_update.sh.old` - `Helium.desktop` --> `Helium.desktop.old` which will be overwritten at every update -- Run `helium_launcher_update.sh -h` for help \ No newline at end of file +- Run `helium_launcher_update.sh -h` for help +  \ No newline at end of file From e216d9cc4ba18b3b611f7f5678f572957789ccbd Mon Sep 17 00:00:00 2001 From: Fr4nz D13trich Date: Sun, 28 Dec 2025 00:29:54 +0100 Subject: [PATCH 63/63] Script version bumped --- helium_helper.sh | 2 +- helium_launcher_update.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/helium_helper.sh b/helium_helper.sh index 480f8a3..78ae4c8 100755 --- a/helium_helper.sh +++ b/helium_helper.sh @@ -20,7 +20,7 @@ APP_SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Helper Script" SCRIPT_FILE_NAME="helium_helper.sh" AUTO_SCRIPT_FILE_NAME="helium_launcher_update.sh" -SCRIPT_VERSION="0.5.6" +SCRIPT_VERSION="0.5.7" ALIAS="update-helium" ## LOCATIONS diff --git a/helium_launcher_update.sh b/helium_launcher_update.sh index 5924756..332d100 100755 --- a/helium_launcher_update.sh +++ b/helium_launcher_update.sh @@ -11,7 +11,7 @@ FILE_EXTENSION="AppImage" APP_SOURCE="GitHub" SCRIPT_NAME="$APP_NAME Launcher Updater" SCRIPT_FILE_NAME="helium_launcher_update.sh" -SCRIPT_VERSION="0.5.6" +SCRIPT_VERSION="0.5.7" DATE=$(date) ## LOCATIONS