-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·74 lines (60 loc) · 2.07 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
·74 lines (60 loc) · 2.07 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
#!/usr/bin/env bash
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export LOG_FILE="/tmp/setup-$(date +%Y%m%d-%H%M%S).log"
source "$SCRIPT_DIR/scripts/status.sh"
CURRENT_STEP_MESSAGE="Checking for sudo"
status_msg
if ! command -v sudo >/dev/null 2>&1; then
status_error "sudo is required. Please install sudo and add your user to the wheel group."
fi
status_ok
# Ensure base-devel is installed (needed for yay and AUR)
CURRENT_STEP_MESSAGE="Installing base-devel"
status_msg
if sudo pacman -S --noconfirm --needed base-devel > /tmp/pacman.log 2>&1; then
status_ok
else
status_skip "Failed to install base-devel."
fi
# Install yay if not present
if ! command -v yay >/dev/null 2>&1; then
CURRENT_STEP_MESSAGE="Installing yay (AUR helper)"
status_msg
if ! git clone https://aur.archlinux.org/yay.git /tmp/yay; then
status_error "Failed to clone yay repository"
fi
pushd /tmp/yay > /dev/null || status_error "Failed to enter yay directory"
if ! makepkg -si --noconfirm; then
popd > /dev/null
rm -rf /tmp/yay
status_error "Failed to build yay"
fi
popd > /dev/null
rm -rf /tmp/yay
status_ok
fi
# Run individual setup scripts
echo "=== Installing packages ==="
bash "$SCRIPT_DIR/scripts/install-packages.sh"
echo "=== Setting up custom scripts ==="
bash "$SCRIPT_DIR/scripts/setup-scripts.sh"
echo "=== Setting up dotfiles ==="
bash "$SCRIPT_DIR/scripts/setup-dotfiles.sh"
echo "=== Setting up launch scripts ==="
bash "$SCRIPT_DIR/scripts/setup-launch-scripts.sh"
echo "=== Setting up assets ==="
bash "$SCRIPT_DIR/scripts/setup-assets.sh"
echo "=== Setting up system configurations ==="
bash "$SCRIPT_DIR/scripts/setup-system.sh"
echo "=== Running post-install configuration ==="
bash "$SCRIPT_DIR/scripts/post-install.sh"
# echo "=== Retrieving secrets ==="
# bash "$SCRIPT_DIR/scripts/retrieve-secrets.sh"
status_summary
echo "All done!"
echo "============================"
echo "Next steps:"
echo " -> reboot"
echo " -> sudo tailscale up"
echo " -> run retrieve-secrets.sh"
echo "============================"