Still deprecate install.sh and update.sh anyway; Tidier structure

This commit is contained in:
clsty
2025-10-31 09:11:03 +08:00
parent f01a2a06b5
commit d36966e2d7
6 changed files with 12 additions and 54 deletions
+10 -8
View File
@@ -11,19 +11,26 @@ set -e
#####################################################################################
showhelp_global(){
printf "[$0]: Handle setup for illogical-impulse.
printf "${STY_CYAN}NOTE:
The old \"./install.sh\" is now \"./setup install\"
The old \"./update.sh\" is now \"./setup exp-update\"
The old \"./uninstall.sh\" is now \"./setup exp-uninstall\"${STY_RST}
[$0]: Handle setup for illogical-impulse.
Syntax:
$0 <subcommand> [OPTIONS]...
Subcommands:
install (Default) Install/Reinstall/Update illogical-impulse.
install (Re)Install/Update illogical-impulse.
install-deps Run the install step \"1. Install dependencies\"
install-setups Run the install step \"2. Setup for permissions/services etc\"
install-files Run the install step \"3. Copying config files\"
exp-uninstall (Experimental) Uninstall illogical-impulse.
exp-update (Experimental) Update illogical-impulse without fully reinstall.
exp-update-old (Experimental) exp-update but use behaves like old version.
checkdeps (For dev only) Check whether pkgs exist in AUR or repos of Arch.
help Show this help message.
@@ -33,7 +40,7 @@ For each <subcommand>, use -h for details:
}
case $1 in
# Global help
help|--help|-h)showhelp_global;exit;;
""|help|--help|-h)showhelp_global;exit;;
# Correct subcommand
install|exp-uninstall|exp-update|exp-update-old|checkdeps)
SUBCMD_NAME=$1
@@ -44,11 +51,6 @@ case $1 in
SUBCMD_NAME=$1
SUBCMD_DIR=./sdata/subcmd-install
shift;;
# No subcommand, default to install
-*|"")
SUBCMD_NAME=install
SUBCMD_DIR=./sdata/subcmd-install
;;
# Wrong subcommand
*)printf "${STY_RED}Unknown subcommand \"$1\".${STY_RST}\n";showhelp_global;exit 1;;
esac