diff --git a/sdata/lib/options-install.sh b/sdata/lib/options-install.sh index c0b9320b4..9ff088132 100644 --- a/sdata/lib/options-install.sh +++ b/sdata/lib/options-install.sh @@ -1,4 +1,29 @@ # Handle args for subcmd: install +showhelp(){ +echo -e "Syntax: $0 [OPTIONS]... + +Idempotent installation script for dotfiles. + +Options for install: + -h, --help Print this help message and exit + -f, --force (Dangerous) Force mode without any confirm + -c, --clean Clean the build cache first + --skip-allgreeting Skip the whole process greeting + --skip-alldeps Skip the whole process installing dependency + --skip-allsetups Skip the whole process setting up permissions/services etc + --skip-allfiles Skip the whole process copying configuration files + -s, --skip-sysupdate Skip system package upgrade e.g. \"sudo pacman -Syu\" + --skip-hyprland Skip installing the config for Hyprland + --skip-fish Skip installing the config for Fish + --skip-plasmaintg Skip installing plasma-browser-integration + --skip-miscconf Skip copying the dirs and files to \".configs\" except for + AGS, Fish and Hyprland + --exp-files Use experimental script for the third step copying files + --fontset (Unavailable yet) Use a set of pre-defined font and config + --via-nix (Unavailable yet) Use Nix to install dependencies +" +} + cleancache(){ rm -rf "$base/cache" } @@ -15,7 +40,7 @@ para=$(getopt \ eval set -- "$para" while true ; do case "$1" in - -h|--help) showhelp_global;exit;; + -h|--help) showhelp;exit;; -c|--clean) cleancache;shift;; --) break ;; *) shift ;; diff --git a/sdata/lib/options.sh b/sdata/lib/options.sh index ea12ad2a3..38982d6cd 100644 --- a/sdata/lib/options.sh +++ b/sdata/lib/options.sh @@ -28,7 +28,6 @@ Options for install: --exp-files Use experimental script for the third step copying files --fontset (Unavailable yet) Use a set of pre-defined font and config --via-nix (Unavailable yet) Use Nix to install dependencies - --exp-uninstall Use experimental uninstall script Subcommand: exp-uninstall Using experimental uninstall script. @@ -51,6 +50,10 @@ case $1 in SCRIPT_SUBCOMMAND=$1 shift ;; + # Global help + help|--help|-h) + showhelp_global;exit + ;; # no subcommand (has options: -* ; no options: "") -*|"") SCRIPT_SUBCOMMAND=install @@ -64,9 +67,6 @@ case ${SCRIPT_SUBCOMMAND} in install) source ./sdata/lib/options-install.sh ;; - exp-uninstall) - #source ./sdata/lib/options-exp-uninstall.sh - ;; exp-update) source ./sdata/lib/options-exp-update.sh ;; diff --git a/sdata/step/exp-update.sh b/sdata/step/exp-update.sh index 9a681d2ea..6b4cfa45c 100644 --- a/sdata/step/exp-update.sh +++ b/sdata/step/exp-update.sh @@ -564,7 +564,6 @@ if [[ "$SKIP_NOTICE" == false ]]; then exit 1 fi fi -exit # Check if we're in a git repository cd "$REPO_ROOT" || log_die "Failed to change to repository directory"