forked from Shinonome/dots-hyprland
Still deprecate install.sh and update.sh anyway; Tidier structure
This commit is contained in:
-22
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# TODO: Remove this script (install.sh) after 2025.12.01
|
|
||||||
|
|
||||||
STY_RED='\e[31m'
|
|
||||||
STY_RST='\e[00m'
|
|
||||||
STY_INVERT='\e[7m'
|
|
||||||
|
|
||||||
printf "${STY_RED}"
|
|
||||||
printf "========================================================================\n"
|
|
||||||
printf "${STY_INVERT}"
|
|
||||||
printf "! ATTENTION !"
|
|
||||||
printf "${STY_RST}\n"
|
|
||||||
printf "${STY_RED}"
|
|
||||||
printf "You are using \"./install.sh\" which is kept for compatibility.\n"
|
|
||||||
printf "Please use \"./setup install\" instead.\n"
|
|
||||||
printf "The old \"./install.sh\" is planned to be removed after 2025.12.01.\n"
|
|
||||||
printf "========================================================================\n"
|
|
||||||
printf "${STY_RST}"
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
./setup install "$@"
|
|
||||||
@@ -13,7 +13,7 @@ The mechanism is introduced by [Makrennel](https://github.com/Makrennel) in [PR#
|
|||||||
Why is this awesome?
|
Why is this awesome?
|
||||||
- It makes it possible to control version since some packages may involve breaking changes from time to time.
|
- It makes it possible to control version since some packages may involve breaking changes from time to time.
|
||||||
- It makes the dependency trackable for package manager, so that you always know why you have installed some package.
|
- It makes the dependency trackable for package manager, so that you always know why you have installed some package.
|
||||||
- As a result, it enables a workable `uninstall.sh` script.
|
- As a result, it enables a workable uninstall process.
|
||||||
|
|
||||||
The PKGBUILDs contains two forms of dependencies:
|
The PKGBUILDs contains two forms of dependencies:
|
||||||
- Package name written in dependencies, like a "meta" package.
|
- Package name written in dependencies, like a "meta" package.
|
||||||
|
|||||||
@@ -477,7 +477,7 @@ if [[ "${SKIP_NOTICE}" == false ]]; then
|
|||||||
log_warning "THIS SCRIPT IS NOT FULLY TESTED AND MAY CAUSE ISSUES!"
|
log_warning "THIS SCRIPT IS NOT FULLY TESTED AND MAY CAUSE ISSUES!"
|
||||||
log_warning "It might be safer if you want to preserve your modifications and not delete added files,"
|
log_warning "It might be safer if you want to preserve your modifications and not delete added files,"
|
||||||
log_warning " but this can cause partial updates and therefore unexpected behavior like in #1856."
|
log_warning " but this can cause partial updates and therefore unexpected behavior like in #1856."
|
||||||
log_warning "In general, prefer install.sh for updates."
|
log_warning "In general, prefer ./setup install for updates."
|
||||||
safe_read "Continue? (y/N): " response "N"
|
safe_read "Continue? (y/N): " response "N"
|
||||||
|
|
||||||
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
||||||
|
|||||||
@@ -11,19 +11,26 @@ set -e
|
|||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
showhelp_global(){
|
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:
|
Syntax:
|
||||||
$0 <subcommand> [OPTIONS]...
|
$0 <subcommand> [OPTIONS]...
|
||||||
|
|
||||||
Subcommands:
|
Subcommands:
|
||||||
install (Default) Install/Reinstall/Update illogical-impulse.
|
install (Re)Install/Update illogical-impulse.
|
||||||
install-deps Run the install step \"1. Install dependencies\"
|
install-deps Run the install step \"1. Install dependencies\"
|
||||||
install-setups Run the install step \"2. Setup for permissions/services etc\"
|
install-setups Run the install step \"2. Setup for permissions/services etc\"
|
||||||
install-files Run the install step \"3. Copying config files\"
|
install-files Run the install step \"3. Copying config files\"
|
||||||
|
|
||||||
exp-uninstall (Experimental) Uninstall illogical-impulse.
|
exp-uninstall (Experimental) Uninstall illogical-impulse.
|
||||||
exp-update (Experimental) Update illogical-impulse without fully reinstall.
|
exp-update (Experimental) Update illogical-impulse without fully reinstall.
|
||||||
exp-update-old (Experimental) exp-update but use behaves like old version.
|
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.
|
checkdeps (For dev only) Check whether pkgs exist in AUR or repos of Arch.
|
||||||
help Show this help message.
|
help Show this help message.
|
||||||
|
|
||||||
@@ -33,7 +40,7 @@ For each <subcommand>, use -h for details:
|
|||||||
}
|
}
|
||||||
case $1 in
|
case $1 in
|
||||||
# Global help
|
# Global help
|
||||||
help|--help|-h)showhelp_global;exit;;
|
""|help|--help|-h)showhelp_global;exit;;
|
||||||
# Correct subcommand
|
# Correct subcommand
|
||||||
install|exp-uninstall|exp-update|exp-update-old|checkdeps)
|
install|exp-uninstall|exp-update|exp-update-old|checkdeps)
|
||||||
SUBCMD_NAME=$1
|
SUBCMD_NAME=$1
|
||||||
@@ -44,11 +51,6 @@ case $1 in
|
|||||||
SUBCMD_NAME=$1
|
SUBCMD_NAME=$1
|
||||||
SUBCMD_DIR=./sdata/subcmd-install
|
SUBCMD_DIR=./sdata/subcmd-install
|
||||||
shift;;
|
shift;;
|
||||||
# No subcommand, default to install
|
|
||||||
-*|"")
|
|
||||||
SUBCMD_NAME=install
|
|
||||||
SUBCMD_DIR=./sdata/subcmd-install
|
|
||||||
;;
|
|
||||||
# Wrong subcommand
|
# Wrong subcommand
|
||||||
*)printf "${STY_RED}Unknown subcommand \"$1\".${STY_RST}\n";showhelp_global;exit 1;;
|
*)printf "${STY_RED}Unknown subcommand \"$1\".${STY_RST}\n";showhelp_global;exit 1;;
|
||||||
esac
|
esac
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# TODO: Remove this script (update.sh) after 2025.12.01
|
|
||||||
|
|
||||||
STY_RED='\e[31m'
|
|
||||||
STY_RST='\e[00m'
|
|
||||||
STY_INVERT='\e[7m'
|
|
||||||
|
|
||||||
printf "${STY_RED}"
|
|
||||||
printf "========================================================================\n"
|
|
||||||
printf "${STY_INVERT}"
|
|
||||||
printf "! ATTENTION !"
|
|
||||||
printf "${STY_RST}\n"
|
|
||||||
printf "${STY_RED}"
|
|
||||||
printf "You are using \"./update.sh\" which is kept for compatibility.\n"
|
|
||||||
printf "Please use \"./setup exp-update-old\" or \"./setup exp-update\" instead.\n"
|
|
||||||
printf "The old \"./update.sh\" is planned to be removed after 2025.12.01.\n"
|
|
||||||
printf "========================================================================\n"
|
|
||||||
printf "${STY_RST}"
|
|
||||||
sleep 5
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
|
||||||
./setup exp-update-old "$@"
|
|
||||||
Reference in New Issue
Block a user