Add distro and arch detect, add skip options

This commit is contained in:
clsty
2025-10-02 00:35:33 +08:00
parent 7aa1230553
commit 852172a7ff
10 changed files with 121 additions and 35 deletions
+18 -7
View File
@@ -13,12 +13,23 @@ set -e
# 0. Before we start
source ./scriptdata/install-greeting.sh
#####################################################################################
printf "${COLOR_CYAN}[$0]: 1. Install dependencies\n${COLOR_RESET}"
# TODO: if `--via-nix` is specified, source `install-deps-nix` instead.
source ./scriptdata/install-deps-arch.sh
if [[ "${SKIP_ALLDEPS}" != true ]]; then
printf "${COLOR_CYAN}[$0]: 1. Install dependencies\n${COLOR_RESET}"
if [[ "${INSTALL_VIA_NIX}" == "true" ]]; then
source ./scriptdata/install-deps-nix.sh
elif [[ "${OS_DISTRO_ID}" == "arch" || "${OS_DISTRO_ID_LIKE}" == "arch" ]]; then
source ./scriptdata/install-deps-arch.sh
else
source ./scriptdata/install-deps-any.sh
fi
fi
#####################################################################################
printf "${COLOR_CYAN}[$0]: 2. Setup for user groups/services etc\n${COLOR_RESET}"
source ./scriptdata/install-setups.sh
if [[ "${SKIP_ALLSETUPS}" != true ]]; then
printf "${COLOR_CYAN}[$0]: 2. Setup for user groups/services etc\n${COLOR_RESET}"
source ./scriptdata/install-setups.sh
fi
#####################################################################################
printf "${COLOR_CYAN}[$0]: 3. Copying + Configuring\n${COLOR_RESET}"
source ./scriptdata/install-files.sh
if [[ "${SKIP_ALLFILES}" != true ]]; then
printf "${COLOR_CYAN}[$0]: 3. Copying + Configuring\n${COLOR_RESET}"
source ./scriptdata/install-files.sh
fi