mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 23:09:26 -05:00
65 lines
2.2 KiB
Bash
Executable File
65 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
cd "$(dirname "$0")"
|
|
export base="$(pwd)"
|
|
|
|
# Store original arguments for experimental scripts
|
|
ORIGINAL_ARGS=("$@")
|
|
|
|
source ./sdata/lib/environment-variables.sh
|
|
source ./sdata/lib/functions.sh
|
|
source ./sdata/lib/package-installers.sh
|
|
source ./sdata/lib/options.sh
|
|
|
|
prevent_sudo_or_root
|
|
set -e
|
|
|
|
#####################################################################################
|
|
# For uninstall script
|
|
if [[ "${EXPERIMENTAL_UNINSTALL_SCRIPT}" = true ]]; then
|
|
source ./sdata/exp/uninstall.sh
|
|
exit
|
|
fi
|
|
# For update script
|
|
if [[ "${EXPERIMENTAL_UPDATE_SCRIPT}" = true ]]; then
|
|
export SOURCED_FROM_INSTALL=true
|
|
# Pass only update-specific arguments
|
|
UPDATE_ARGS=()
|
|
for arg in "${ORIGINAL_ARGS[@]}"; do
|
|
case "$arg" in
|
|
--exp-update|--force|-f|--clean|-c|--skip-allgreeting|--skip-alldeps|--skip-allsetups|--skip-allfiles|--skip-sysupdate|-s|--skip-hyprland|--skip-fish|--skip-miscconf|--skip-plasmaintg|--exp-files|--via-nix|--fontset)
|
|
;;
|
|
-u|--update-force|-p|--packages|-n|--dry-run|-v|--verbose|--skip-notice)
|
|
UPDATE_ARGS+=("$arg")
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
done
|
|
bash ./sdata/exp/update.sh "${UPDATE_ARGS[@]}"
|
|
exit
|
|
fi
|
|
#####################################################################################
|
|
# 0. Before we start
|
|
if [[ "${SKIP_ALLGREETING}" != true ]]; then
|
|
source ./sdata/step/0.install-greeting.sh
|
|
fi
|
|
#####################################################################################
|
|
if [[ "${SKIP_ALLDEPS}" != true ]]; then
|
|
printf "${STY_CYAN}[$0]: 1. Install dependencies\n${STY_RST}"
|
|
source ./sdata/step/1.install-deps-selector.sh
|
|
fi
|
|
#####################################################################################
|
|
if [[ "${SKIP_ALLSETUPS}" != true ]]; then
|
|
printf "${STY_CYAN}[$0]: 2. Setup for permissions/services etc\n${STY_RST}"
|
|
source ./sdata/step/2.install-setups-selector.sh
|
|
fi
|
|
#####################################################################################
|
|
if [[ "${SKIP_ALLFILES}" != true ]]; then
|
|
printf "${STY_CYAN}[$0]: 3. Copying config files\n${STY_RST}"
|
|
if [[ "${EXPERIMENTAL_FILES_SCRIPT}" != true ]]; then
|
|
source ./sdata/step/3.install-files.sh
|
|
else
|
|
source ./sdata/step/3.install-files.experimental.sh
|
|
fi
|
|
fi
|