mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Deprecate install.sh in favor of setup
Still decide to deprecate install.sh cuz TAB completion can not be done without intrusive and automatic method, so just use ./setup instead.
This commit is contained in:
+5
-9
@@ -1,14 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# TODO: Handle TAB completion for ./setup with non-intrusive method,
|
# Remove this script (install.sh) after 2025.12.01
|
||||||
# or other shortcut helper like TUI.
|
|
||||||
# After that, remove this script (install.sh).
|
|
||||||
|
|
||||||
|
|
||||||
#STY_RED='\e[31m'
|
|
||||||
#STY_RST='\e[00m'
|
|
||||||
#printf "${STY_RED}You are using \"./install.sh\" which is kept for compatibility and will be removed in future.\n"
|
|
||||||
#printf "Please use \"./setup install\" instead.${STY_RST}\n"
|
|
||||||
|
|
||||||
|
STY_RED='\e[31m'
|
||||||
|
STY_RST='\e[00m'
|
||||||
|
printf "${STY_RED}You are using \"./install.sh\" which is kept for compatibility and will be removed in future.\n"
|
||||||
|
printf "Please use \"./setup install\" instead.${STY_RST}\n"
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
./setup install "$@"
|
./setup install "$@"
|
||||||
|
|||||||
@@ -287,20 +287,3 @@ function check_disk_space() {
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function showhelp_global(){
|
|
||||||
echo -e "
|
|
||||||
|
|
||||||
Syntax:
|
|
||||||
$0 <subcommand> [OPTIONS]...
|
|
||||||
|
|
||||||
Subcommands:
|
|
||||||
install Idempotent installation for dotfiles.
|
|
||||||
exp-uninstall Experimental uninstall
|
|
||||||
exp-update Experimental update
|
|
||||||
help Show this help message
|
|
||||||
|
|
||||||
Please run the following for details:
|
|
||||||
$0 <subcommand> -h
|
|
||||||
"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -10,13 +10,31 @@ prevent_sudo_or_root
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
|
function showhelp_global(){
|
||||||
|
printf "[$0]: Handle setup for illogical-impulse.
|
||||||
|
|
||||||
|
Syntax:
|
||||||
|
$0 <subcommand> [OPTIONS]...
|
||||||
|
|
||||||
|
Subcommands:
|
||||||
|
install (Default) Install or update illogical-impulse.
|
||||||
|
exp-uninstall (Experimental) Uninstall illogical-impulse.
|
||||||
|
exp-update (Experimental) Update illogical-impulse without fully install.
|
||||||
|
help Show this help message
|
||||||
|
|
||||||
|
Please run the following for details:
|
||||||
|
$0 <subcommand> -h
|
||||||
|
"
|
||||||
|
}
|
||||||
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)SCRIPT_SUBCOMMAND=$1;shift;;
|
install|exp-uninstall|exp-update)SCRIPT_SUBCOMMAND=$1;shift;;
|
||||||
|
# No subcommand
|
||||||
|
-*|"")SCRIPT_SUBCOMMAND=install;;
|
||||||
# Wrong subcommand
|
# Wrong subcommand
|
||||||
*)echo "Unknown subcommand \"$1\", aborting...";exit 1;;
|
*)printf "${STY_RED}Unknown subcommand \"$1\".${STY_RST}\n";showhelp_global;exit 1;;
|
||||||
esac
|
esac
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
case ${SCRIPT_SUBCOMMAND} in
|
case ${SCRIPT_SUBCOMMAND} in
|
||||||
|
|||||||
Reference in New Issue
Block a user