Less lines, exit on finished installation

This commit is contained in:
Sir RaptaG 2023-06-27 13:53:40 +03:00 committed by GitHub
parent 0006ee3a3d
commit a1843e6565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,12 +101,10 @@ function install_spotube(){
case "${reinstall}" in
[yY]*)
uninstall_spotube
;;
uninstall_spotube ;;
*)
echo 'Aborting installation...'
exit 1
;;
exit 1 ;;
esac
fi
@ -132,12 +130,10 @@ function uninstall_spotube(){
case "${confirm}" in
[yY]*)
echo 'Unstalling Spotube..'
rm -rf ${installDir} ${desktopDir} ${appdata} ${icon} ${symlink}
;;
rm -rf ${installDir} ${desktopDir} ${appdata} ${icon} ${symlink} ;;
*)
echo 'Aborting...'
exit 0
;;
exit 0 ;;
esac
}
@ -153,19 +149,16 @@ case "$1" in
install_deps
download_extract_spotube
install_spotube
;;
exit 0 ;;
-r | --remove)
rootCheck
uninstall_spotube
exit 0
;;
exit 0 ;;
-h | --help | "")
help
exit 0
;;
exit 0 ;;
*)
echo "Invalid flag "$1"."
echo "Invalid flag '$1'"
echo "Please run ./${fname} for more information."
exit 1
;;
exit 1 ;;
esac