Browse Source

Implement update, remove utility update

pull/67/head
Weilbyte 4 years ago
committed by GitHub
parent
commit
43818baea0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 16
      PVEDiscordDark.sh

16
PVEDiscordDark.sh

@ -88,7 +88,7 @@ function usage {
echo -e " install Install the theme"
echo -e " uninstall Uninstall the theme"
echo -e " update Update the theme (runs uninstall, then install)"
echo -e " utility-update Update this utility\n"
# echo -e " utility-update Update this utility\n" (to be implemented)
echo -e "Exit status:"
echo -e " 0 OK"
echo -e " 1 Failure"
@ -149,7 +149,7 @@ function install {
if [ "$_silent" = false ]; then echo -e "\e[1A\e[K${CHECKMARK} Downloading images (${#IMAGELISTARR[@]}/${#IMAGELISTARR[@]})"; fi
if [ "$_silent" = false ]; then echo -e "Theme installed."; fi
exit 0
if [ "$_noexit" = false ]; then exit 0; fi
fi
}
@ -172,7 +172,7 @@ function uninstall {
rm /usr/share/pve-manager/images/dd_*
if [ "$_silent" = false ]; then echo -e "Theme uninstalled."; fi
exit 0
if [ "$_noexit" = false ]; then exit 0; fi
fi
}
@ -180,6 +180,7 @@ function uninstall {
_silent=false
_command=false
_noexit=false
parse_cli()
{
@ -214,6 +215,15 @@ parse_cli()
exit 0
fi
;;
update)
if [ "$_command" = false ]; then
_command=true
_noexit=true
uninstall
install
exit 0
fi
;;
*)
echo -e "${BRED}Error: Got an unexpected argument \"$_key\"${REG}\n";
usage;

Loading…
Cancel
Save