to do updated
This commit is contained in:
parent
7717c5932c
commit
ebb5c25de6
1 changed files with 10 additions and 8 deletions
|
|
@ -135,8 +135,7 @@ add_launcher() {
|
|||
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
|
||||
mkdir -p $LAUNCHER_PATH $BACKUP_PATH $CONFIG_PATH/icon
|
||||
cp $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop
|
||||
mv $TMP/helium.desktop.template $BACKUP_PATH/$APP_NAME.desktop.backup
|
||||
mv $TMP/helium.desktop.template $LAUNCHER_PATH/$APP_NAME.desktop
|
||||
mv $TMP/helium.png $CONFIG_PATH/icon
|
||||
echo -e "\n ${GRN}$APP_NAME_LONG launcher is set up!${CRS}\n"
|
||||
exit_clean
|
||||
|
|
@ -184,7 +183,7 @@ update_helium() {
|
|||
echo -e "\n ${GRN}$APP_NAME_LONG is already up-to-date!${CRS}\n"
|
||||
|
||||
elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then
|
||||
echo -e "\n ${RED}$APP_NAME_LONG is updatable!${CRS}\n"
|
||||
echo -e "\n ${LCY}$APP_NAME_LONG is updatable!${CRS}\n"
|
||||
echo -e " ${CYN}Local Version :\t${CRS}${LOCAL_VERSION}"
|
||||
echo -e " ${CYN}$SOURCE Version :\t${CRS}${GIT_VERSION}\n"
|
||||
|
||||
|
|
@ -195,14 +194,17 @@ update_helium() {
|
|||
if [[ "$CONFIRM" == "" || "$CONFIRM" == "y" || "$CONFIRM" == "Y" ]] ; then
|
||||
GIT_URL=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}')
|
||||
GIT_FILENAME=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "browser_download_url" | grep "x86_64.AppImage" | grep -v "zsync" | tr -d \" | awk '{print $2}' | awk -F'/' '{print $9}')
|
||||
mkdir -p $TMP
|
||||
mkdir -p $TMP $BACKUP_PATH
|
||||
wget -P $TMP $GIT_URL -q --show-progress
|
||||
chmod +x $TMP/$GIT_FILENAME
|
||||
if [ -f "$INSTALL_PATH/$APP_NAME.old" ] ; then
|
||||
rm $INSTALL_PATH/$APP_NAME.old
|
||||
if [ -f "$BACKUP_PATH/$APP_NAME.old" ] ; then
|
||||
rm $BACKUP_PATH/$APP_NAME.old
|
||||
fi
|
||||
mv $INSTALL_PATH/$APP_NAME.AppImage $INSTALL_PATH/$APP_NAME.old
|
||||
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
|
||||
echo -e "\n ${GRN}$APP_NAME_LONG is up-to-date !${CRS}\n"
|
||||
break
|
||||
|
||||
|
|
@ -432,7 +434,7 @@ while getopts ":i,:L,:u,:U,:r,:c,:s,:S,:h" OPTION ; do
|
|||
exit;;
|
||||
|
||||
*)
|
||||
echo -e "\n${YEL}Option ${RED}-t${YEL} not recognized... Refer to help below!${CRS}"
|
||||
echo -e "\n${YEL}Option ${RED}$1${YEL} not recognized... Refer to help below!${CRS}"
|
||||
help
|
||||
exit;;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue