Version bumped up
This commit is contained in:
parent
99755d40fc
commit
c1ec805b1b
3 changed files with 49 additions and 35 deletions
|
|
@ -19,22 +19,23 @@ APP_NAME_LONG="Helium Web Browser"
|
||||||
SOURCE="GitHub"
|
SOURCE="GitHub"
|
||||||
SCRIPT_NAME="$APP_NAME Helper Script"
|
SCRIPT_NAME="$APP_NAME Helper Script"
|
||||||
SCRIPT_FILE_NAME="helium_helper.sh"
|
SCRIPT_FILE_NAME="helium_helper.sh"
|
||||||
AUTO_SCRIPT_FILE_NAME="helium_auto_update.sh"
|
AUTO_SCRIPT_FILE_NAME="helium_launcher_update.sh"
|
||||||
SCRIPT_VERSION="0.5.5"
|
SCRIPT_VERSION="0.5.6"
|
||||||
ALIAS="update-helium"
|
ALIAS="update-helium"
|
||||||
|
|
||||||
## LOCATIONS
|
## LOCATIONS
|
||||||
TMP=/tmp/$APP_NAME
|
TMP=/tmp/$APP_NAME
|
||||||
INSTALL_PATH=$HOME/.apps/$APP_NAME
|
INSTALL_PATH=$HOME/.apps/$APP_NAME
|
||||||
CONFIG_PATH=$INSTALL_PATH/assets
|
ASSET_PATH=$INSTALL_PATH/assets
|
||||||
BACKUP_PATH=$INSTALL_PATH/assets/backup
|
BACKUP_PATH=$ASSET_PATH/backup
|
||||||
LOG_PATH=$INSTALL_PATH/assets/logs
|
LOG_PATH=$ASSET_PATH/logs
|
||||||
LOG=$LOG_PATH/log
|
LOG=$LOG_PATH/log
|
||||||
LAUNCHER_PATH=$HOME/.local/share/applications
|
LAUNCHER_PATH=$HOME/.local/share/applications
|
||||||
SCRIPT_PATH=$HOME/.local/bin
|
SCRIPT_PATH=$HOME/.local/bin
|
||||||
|
|
||||||
## REMOTE LOCATIONS
|
## 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
|
SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest
|
||||||
|
|
||||||
########## FUNCTIONS ###########
|
########## FUNCTIONS ###########
|
||||||
|
|
@ -129,11 +130,11 @@ add_launcher() {
|
||||||
echo
|
echo
|
||||||
|
|
||||||
if [[ "$CONFIRM_LAUNCHER" == "" || "$CONFIRM_LAUNCHER" == "y" || "$CONFIRM_LAUNCHER" == "Y" ]] ; then
|
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
|
LAUNCHER_URL=$REMOTE_REPO_URL/assets/launcher/helium.desktop.template
|
||||||
ICON_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/assets/icon/helium.png
|
ICON_URL=$REMOTE_REPO_URL/assets/icon/helium.png
|
||||||
AUTO_SCRIPT_URL=https://lab.c95.org/fr4nz/helium-helper/raw/branch/main/$AUTO_SCRIPT_FILE_NAME
|
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.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
|
if ! [ -f "$SCRIPT_PATH/$AUTO_SCRIPT_FILE_NAME" ] ; then
|
||||||
wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress
|
wget -P $TMP $AUTO_SCRIPT_URL -q --show-progress
|
||||||
chmod +x $TMP/$AUTO_SCRIPT_FILE_NAME
|
chmod +x $TMP/$AUTO_SCRIPT_FILE_NAME
|
||||||
|
|
@ -143,13 +144,13 @@ add_launcher() {
|
||||||
wget -P $TMP $LAUNCHER_URL -q --show-progress
|
wget -P $TMP $LAUNCHER_URL -q --show-progress
|
||||||
wget -P $TMP $ICON_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.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|%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%|$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|%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
|
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.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}"
|
echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}"
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
@ -273,7 +274,7 @@ update_helium() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
### AUTOMATIC UPDATE --> TO DO
|
### AUTOMATIC UPDATE --> TO DO?
|
||||||
auto_update() {
|
auto_update() {
|
||||||
if ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then
|
if ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then
|
||||||
echo -e "\n ${RED}$APP_NAME AppImage not found! Can't add auto update script...${CRS}"
|
echo -e "\n ${RED}$APP_NAME AppImage not found! Can't add auto update script...${CRS}"
|
||||||
|
|
|
||||||
|
|
@ -9,25 +9,26 @@ set -e
|
||||||
APP_NAME="Helium"
|
APP_NAME="Helium"
|
||||||
APP_NAME_LONG="Helium Web Browser"
|
APP_NAME_LONG="Helium Web Browser"
|
||||||
SOURCE="GitHub"
|
SOURCE="GitHub"
|
||||||
SCRIPT_NAME="$APP_NAME quiet updater"
|
SCRIPT_NAME="$APP_NAME launcher updater"
|
||||||
SCRIPT_FILE_NAME="helium_auto_update.sh"
|
SCRIPT_FILE_NAME="helium_launcher_update.sh"
|
||||||
SCRIPT_VERSION="0.5.5"
|
SCRIPT_VERSION="0.5.6"
|
||||||
ALIAS="auto-update-helium"
|
ALIAS="auto-update-helium"
|
||||||
|
DATE=$(date)
|
||||||
|
|
||||||
## LOCATIONS
|
## LOCATIONS
|
||||||
TMP=/tmp/$APP_NAME
|
TMP=/tmp/$APP_NAME
|
||||||
INSTALL_PATH=$HOME/.apps/$APP_NAME
|
INSTALL_PATH=$HOME/.apps/$APP_NAME
|
||||||
CONFIG_PATH=$INSTALL_PATH/assets
|
ASSET_PATH=$INSTALL_PATH/assets
|
||||||
BACKUP_PATH=$INSTALL_PATH/assets/backup
|
BACKUP_PATH=$ASSET_PATH/backup
|
||||||
LOG_PATH=$INSTALL_PATH/assets/logs
|
LOG_PATH=$ASSET_PATH/logs
|
||||||
LOG=$LOG_PATH/log
|
LOG=$LOG_PATH/log
|
||||||
LAUNCHER_PATH=$HOME/.local/share/applications
|
LAUNCHER_PATH=$HOME/.local/share/applications
|
||||||
ICON=$CONFIG_PATH/icon/helium.png
|
ICON=$ASSET_PATH/icon/helium.png
|
||||||
SCRIPT_PATH=$HOME/.local/bin
|
SCRIPT_PATH=$HOME/.local/bin
|
||||||
DATE=$(date)
|
|
||||||
|
|
||||||
## REMOTE LOCATIONS
|
## 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
|
SOURCE_URL=https://api.github.com/repos/imputnet/helium-linux/releases/latest
|
||||||
|
|
||||||
########## FUNCTIONS ###########
|
########## FUNCTIONS ###########
|
||||||
|
|
@ -62,6 +63,7 @@ dependency_check () {
|
||||||
if [ -f "$TMP/missingDeps" ] ; then
|
if [ -f "$TMP/missingDeps" ] ; then
|
||||||
MISSING=$(cat $TMP/missingDeps)
|
MISSING=$(cat $TMP/missingDeps)
|
||||||
echo "${DATE} | Failed to update - missing dependencies : $MISSING" >> $LOG
|
echo "${DATE} | Failed to update - missing dependencies : $MISSING" >> $LOG
|
||||||
|
notify-send -i "$ICON" "Helium Helper" "Update failed! See log for details"
|
||||||
exit_clean
|
exit_clean
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
@ -69,10 +71,12 @@ dependency_check () {
|
||||||
if ! [ -d "$INSTALL_PATH" ] ; then
|
if ! [ -d "$INSTALL_PATH" ] ; then
|
||||||
mkdir -p $INSTALL_PATH
|
mkdir -p $INSTALL_PATH
|
||||||
echo "${DATE} | Failed to update - $APP_NAME installation path not present - But created for logging" >> $LOG
|
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
|
exit
|
||||||
|
|
||||||
elif ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then
|
elif ! [ -f "$INSTALL_PATH/$APP_NAME.AppImage" ] ; then
|
||||||
echo "${DATE} | Failed to update - Local $APP_NAME AppImage not found" >> $LOG
|
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
|
exit
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
@ -196,8 +200,9 @@ show_log() {
|
||||||
|
|
||||||
### HELP
|
### HELP
|
||||||
help() {
|
help() {
|
||||||
echo -e "\n${LCY}${SCRIPT_NAME}${CRS}\n"
|
echo -e "\n${LCY}$SCRIPT_NAME${CRS}\n"
|
||||||
echo -e "$APP_NAME_LONG automatic updater script\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 "Syntax: $SCRIPT_FILE_NAME [ -s | -S | -L | -h ]\n"
|
||||||
echo -e "Options:\n"
|
echo -e "Options:\n"
|
||||||
echo -e "\t-s\tShow script version"
|
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-L\tOpen log in default text editor"
|
||||||
echo -e "\t-h\tPrint this help page.\n"
|
echo -e "\t-h\tPrint this help page.\n"
|
||||||
echo -e "Configured locations:\n"
|
echo -e "Configured locations:\n"
|
||||||
echo -e "\t${CYN}${INSTALL_PATH}${CRS}\t\tInstall location"
|
echo -e "\t${CYN}$INSTALL_PATH${CRS}\t\tInstall location"
|
||||||
echo -e "\t${CYN}${LAUNCHER_PATH}${CRS}\tLauncher location"
|
echo -e "\t${CYN}$LOG_PATH${CRS}\tLog location"
|
||||||
echo -e "\t${CYN}${SCRIPT_PATH}${CRS}\t\t\tScript location\n"
|
echo -e "\t${CYN}$LAUNCHER_PATH${CRS}\tLauncher location"
|
||||||
echo -e "\t${CYN}${LOG_PATH}${CRS}\t\tLog location\n"
|
echo -e "\t${CYN}$SCRIPT_PATH${CRS}\t\t\tScript location\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
### EXIT CLEAN
|
### EXIT CLEAN
|
||||||
22
todo.md
22
todo.md
|
|
@ -7,19 +7,27 @@
|
||||||
- Launcher installer refined
|
- Launcher installer refined
|
||||||
- Clean Up
|
- Clean Up
|
||||||
- Script updater
|
- 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
|
## Add/To Do
|
||||||
- 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
|
|
||||||
- Architecture detection
|
- Architecture detection
|
||||||
- Set alias --> Partially
|
- Set alias --> Partially
|
||||||
- shell recognition missing
|
- shell recognition missing
|
||||||
- Roll back from backup
|
- Roll back from backup
|
||||||
- Config check
|
- Config check
|
||||||
- Desktop notifications in [Auto Update Script](https://lab.c95.org/fr4nz/helium-helper/src/branch/main/helium_auto_update.sh)
|
- Simplification & Clean Up
|
||||||
- Log viewer & config editor
|
- Update Readme
|
||||||
- Add alias remover to remover function
|
- Make functional launcher optional
|
||||||
|
|
||||||
## Repo
|
## Repo
|
||||||
- Merge workflow
|
- Merge workflow
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue