Launcher option added
This commit is contained in:
parent
1e88190670
commit
3cbcd74f06
1 changed files with 7 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue