aurora334eaef
install.sh: refactoring
+15 −11
3 files changed
- M .config/foot/foot.ini +1 −1
- M install.sh +14 −10
- M packages/pkg_gpu.sh +0 −0
| @@ -1,7 +1,7 @@ | |||
| 1 | 1 | include=~/.cache/wal/colors-foot.ini | |
| 2 | 2 | ||
| 3 | 3 | [main] | |
| 4 | − | font=JetBrains Mono Nerd Font:size=12 | |
| 4 | + | font=JetBrains Mono Nerd Font:size=11 | |
| 5 | 5 | # pad=15x15 | |
| 6 | 6 | ||
| 7 | 7 | [colors] | |
| @@ -5,6 +5,9 @@ trap 'log WARN "Interrupted by user"; exit 130' INT | |||
| 5 | 5 | INSTALL_STATUS="none" # none | partial | complete | failed | |
| 6 | 6 | AUTO_YES=0 | |
| 7 | 7 | ||
| 8 | + | ####################### | |
| 9 | + | ## Arguement Parsing ## | |
| 10 | + | ####################### | |
| 8 | 11 | for arg in "$@"; do | |
| 9 | 12 | case "$arg" in | |
| 10 | 13 | --yes|--ci|--non-interactive) | |
| @@ -46,14 +49,6 @@ check_install() { | |||
| 46 | 49 | fi | |
| 47 | 50 | } | |
| 48 | 51 | ||
| 49 | − | ## Add checks for prerequisites | |
| 50 | − | check_install git | |
| 51 | − | check_install gum | |
| 52 | − | check_install stow | |
| 53 | − | ||
| 54 | − | currentDir="$(dirname "$(readlink -f "$0")")" | |
| 55 | − | cd "$currentDir" | |
| 56 | − | ||
| 57 | 52 | ||
| 58 | 53 | choose_packages() { | |
| 59 | 54 | local -n arr=$1 | |
| @@ -96,6 +91,15 @@ confirm() { | |||
| 96 | 91 | ## GATEKEEPING ## | |
| 97 | 92 | ################# | |
| 98 | 93 | ||
| 94 | + | ## Add checks for prerequisites | |
| 95 | + | check_install git | |
| 96 | + | check_install gum | |
| 97 | + | check_install stow | |
| 98 | + | ||
| 99 | + | currentDir="$(dirname "$(readlink -f "$0")")" | |
| 100 | + | cd "$currentDir" | |
| 101 | + | ||
| 102 | + | ||
| 99 | 103 | DISCLAIMER=$(gum style \ | |
| 100 | 104 | --border double \ | |
| 101 | 105 | --border-foreground 196 \ | |
| @@ -230,7 +234,7 @@ Proceed with system configuration (stow, shell)?"; then | |||
| 230 | 234 | ||
| 231 | 235 | log INFO "Running stow..." | |
| 232 | 236 | stow . --no-folding \ | |
| 233 | − | && log INFO "✅ Dotfiles stowed with overwrite." \ | |
| 237 | + | && log INFO "Dotfiles stowed with overwrite." \ | |
| 234 | 238 | || log ERROR "Stow failed" | |
| 235 | 239 | fi | |
| 236 | 240 | ||
| @@ -246,7 +250,7 @@ Proceed with system configuration (stow, shell)?"; then | |||
| 246 | 250 | log INFO "Skipping: zsh is already the default shell" | |
| 247 | 251 | fi | |
| 248 | 252 | else | |
| 249 | − | log WARN "Aborted configuration, didn't configure anything" | |
| 253 | + | log ERROR "Aborted stow, didn't configure or install anything" | |
| 250 | 254 | exit 1 | |
| 251 | 255 | fi | |
| 252 | 256 | ||
Mode 100644 → 100755
[No content changes]