-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·109 lines (90 loc) · 2.63 KB
/
install.sh
File metadata and controls
executable file
·109 lines (90 loc) · 2.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/usr/bin/env bash
# ==================================================
# Arch Linux + Hyprland Automated Installer
# ORCHESTRATOR
# ==================================================
set -e
set -o pipefail
IFS=$'\n\t'
# --------------------------------------------------
# Global Paths & Variables
# --------------------------------------------------
REPO_DIR="$HOME/.dotfiles"
# --------------------------------------------------
# Modularization: Source all functions
# --------------------------------------------------
source "$REPO_DIR/lib/logging.sh"
source "$REPO_DIR/lib/checks.sh"
source "$REPO_DIR/lib/packages.sh"
source "$REPO_DIR/lib/system.sh"
source "$REPO_DIR/lib/zsh.sh"
source "$REPO_DIR/lib/dotfiles.sh"
source "$REPO_DIR/lib/boot.sh"
source "$REPO_DIR/lib/neovim.sh"
# --------------------------------------------------
# Core Orchestration Functions
# --------------------------------------------------
banner() {
echo -e "$BLUE$(
cat <<'EOF'
______ _ _ ____
| ____| (_) (_) | _ \
| |__ _ __ __ _ | |_) | __ _ _ __
| __| | | \ \/ / | | | _ < / _` | | '__|
| | | | > < | | | |_) | | (_| | | |
|_| |_| /_/\_\ |_| |____/ \__,_| |_|
EOF
)$RESET"
echo -e "${PURPLE}Arch Linux & Hyprland Automated Installer${RESET}\n"
}
update_system() {
log_info "Synchronizing repository..."
if [ ! -d "$REPO_DIR" ]; then
log_info "Updating config..."
git -C "$REPO_DIR" pull
fi
if [[ "$(pwd)" != "$REPO_DIR" ]]; then
cd "$REPO_DIR"
fi
}
# --------------------------------------------------
# Full Installation Pipeline
# --------------------------------------------------
full_install() {
# 1. PRE-FLIGHT
ensure_not_root
keep_sudo_alive
# 2. REPO & SYSTEM UPDATE
update_system
# 3. PACKAGES
install_aur_helper
install_packages
# 4. SHELL & DOTFILES
setup_zsh
apply_dotfiles
# 5. SYSTEM CONFIG & SERVICES
configure_system
# 6. BOOTLOADER
configure_boot
log_ok "Installation completed successfully!"
print-missing-packages
log_warn "A system reboot is highly recommended for all changes to take effect."
final_secure_boot_message
}
# --------------------------------------------------
# Main Menu
# --------------------------------------------------
banner
echo -e "${CYAN}1)${RESET} Full installation (recommended)"
echo -e "${CYAN}2)${RESET} Neovim only"
echo -e "${CYAN}3)${RESET} Exit"
read -rp "Select an option: " choice
case "$choice" in
1) full_install ;;
2)
ensure_not_root
install_neovim_config
;;
3) exit 0 ;;
*) full_install ;;
esac