From d36966e2d703d2817f9690fff0bccd324a4a002d Mon Sep 17 00:00:00 2001 From: clsty Date: Fri, 31 Oct 2025 09:11:03 +0800 Subject: [PATCH] Still deprecate install.sh and update.sh anyway; Tidier structure --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 install.sh | 22 ---------------------- sdata/dist-arch/README.md | 2 +- sdata/subcmd-exp-update-old/0.run.sh | 2 +- setup | 18 ++++++++++-------- update.sh | 22 ---------------------- 6 files changed, 12 insertions(+), 54 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) delete mode 100755 install.sh delete mode 100755 update.sh diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/install.sh b/install.sh deleted file mode 100755 index c2fda5569..000000000 --- a/install.sh +++ /dev/null @@ -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 "$@" diff --git a/sdata/dist-arch/README.md b/sdata/dist-arch/README.md index ca09069bd..7f2338480 100644 --- a/sdata/dist-arch/README.md +++ b/sdata/dist-arch/README.md @@ -13,7 +13,7 @@ The mechanism is introduced by [Makrennel](https://github.com/Makrennel) in [PR# Why is this awesome? - 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. -- 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: - Package name written in dependencies, like a "meta" package. diff --git a/sdata/subcmd-exp-update-old/0.run.sh b/sdata/subcmd-exp-update-old/0.run.sh index dc4b97075..5a74d9b4d 100644 --- a/sdata/subcmd-exp-update-old/0.run.sh +++ b/sdata/subcmd-exp-update-old/0.run.sh @@ -477,7 +477,7 @@ if [[ "${SKIP_NOTICE}" == false ]]; then 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 " 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" if [[ ! "$response" =~ ^[Yy]$ ]]; then diff --git a/setup b/setup index c67190d1c..5b15e286b 100755 --- a/setup +++ b/setup @@ -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 [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 , 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 diff --git a/update.sh b/update.sh deleted file mode 100755 index 6a4cb2e42..000000000 --- a/update.sh +++ /dev/null @@ -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 "$@"