Script updater added
This commit is contained in:
parent
fe0546542f
commit
f56c1ac3ea
3 changed files with 134 additions and 72 deletions
56
todo.md
56
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'}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue