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