Prepared for more options
This commit is contained in:
parent
7b2693a0df
commit
f633a04f98
1 changed files with 52 additions and 5 deletions
|
|
@ -115,6 +115,19 @@ install_helium() {
|
|||
done
|
||||
}
|
||||
|
||||
### LAUNCHER
|
||||
add_launcher() {
|
||||
if ! [ -f "$INSTALL_PATH/helium-browser.AppImage" ] ; then
|
||||
echo -e "\n ${RED}Helium AppImage not found! Can't add launcher...${CRS}"
|
||||
exit 1
|
||||
|
||||
else
|
||||
echo -e "\n ${RED}Not implemented yet...${CRS}"
|
||||
exit 0
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
### UPDATE
|
||||
update_helium() {
|
||||
LOCAL_VERSION=$($INSTALL_PATH/helium-browser.AppImage --version | awk '{print $2}')
|
||||
|
|
@ -182,6 +195,19 @@ update_helium() {
|
|||
|
||||
}
|
||||
|
||||
### AUTOMATIC UPDATE
|
||||
auto_update() {
|
||||
if ! [ -f "$INSTALL_PATH/helium-browser.AppImage" ] ; then
|
||||
echo -e "\n ${RED}Helium AppImage not found! Can't add auto update script...${CRS}"
|
||||
exit 1
|
||||
|
||||
else
|
||||
echo -e "\n ${RED}Not implemented yet...${CRS}"
|
||||
exit 0
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
### REMOVE
|
||||
remove_helium() {
|
||||
if [ -d "$INSTALL_PATH" ] ; then
|
||||
|
|
@ -219,7 +245,20 @@ script_version() {
|
|||
|
||||
}
|
||||
|
||||
### COMPARE VERSION
|
||||
### UPDATE SCRIPT
|
||||
update_script() {
|
||||
if ! [ -f "$INSTALL_PATH/helium-browser.AppImage" ] ; then
|
||||
echo -e "\n ${RED}Helium AppImage not found! Can't update script...${CRS}"
|
||||
exit 1
|
||||
|
||||
else
|
||||
echo -e "\n ${RED}Not implemented yet...${CRS}"
|
||||
exit 0
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
### COMPARE APPIMAGE VERSION
|
||||
compare_version() {
|
||||
LOCAL_VERSION=$($INSTALL_PATH/helium-browser.AppImage --version | awk '{print $2}')
|
||||
|
||||
|
|
@ -267,15 +306,16 @@ compare_version() {
|
|||
help() {
|
||||
echo -e "\n${CYN}${SCRIPT_NAME}${CRS}\n"
|
||||
echo -e "Helium Browser installer & updater script\n"
|
||||
echo -e "Syntax: helium_helper.sh [ -i | -u | -r | -c | -s | -h ]\n"
|
||||
echo -e "Syntax: helium_helper.sh [ -i | -L | -u | -U | -r | -c | -s | -S | -h ]\n"
|
||||
echo -e "Options:\n"
|
||||
echo -e "\t-i\tDownload & install Helium from GitHub"
|
||||
#echo -e "\t-L\tCreate desktop launcher"
|
||||
echo -e "\t-L\tCreate desktop launcher ${RED}--> Not yet working${CRS}"
|
||||
echo -e "\t-u\tDownload & update Helium from GitHub"
|
||||
echo -e "\t-U\tEnable automatic updates on login ${RED}--> Not yet working${CRS}"
|
||||
echo -e "\t-r\tRemove Helium"
|
||||
echo -e "\t-c\tCompare local to remote version"
|
||||
#echo -e "\t-S\tUpdate script"
|
||||
echo -e "\t-s\tShow script version"
|
||||
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${GRN}${INSTALL_PATH}${CRS}\t\tInstall location"
|
||||
|
|
@ -291,7 +331,7 @@ clean_tmp() {
|
|||
########## MAIN ##########
|
||||
|
||||
## GET OPTIONS
|
||||
while getopts ":i,:u,:r,:c,:s,:h" OPTION ; do
|
||||
while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do
|
||||
case $OPTION in
|
||||
i)
|
||||
echo -e "\n ${YEL}Installing Helium Browser...${CRS}"
|
||||
|
|
@ -300,6 +340,13 @@ while getopts ":i,:u,:r,:c,:s,:h" OPTION ; do
|
|||
clean_tmp
|
||||
exit ;;
|
||||
|
||||
L)
|
||||
echo -e "\n ${YEL}Adding Helium Browser launcher...${CRS}"
|
||||
dependency_check
|
||||
add_launcher
|
||||
#clean_tmp
|
||||
exit ;;
|
||||
|
||||
u)
|
||||
echo -e "\n ${YEL}Updating Helium Browser...${CRS}"
|
||||
dependency_check
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue