-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathboot.sh
More file actions
executable file
·67 lines (55 loc) · 2.02 KB
/
boot.sh
File metadata and controls
executable file
·67 lines (55 loc) · 2.02 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
#!/bin/bash
#|---/ /+---------------------+---/ /|#
#|--/ /-| Symphony Dotfiles |--/ /-|#
#|-/ /--| Bootstrap Script |-/ /--|#
#|/ /---+---------------------+/ /---|#
set -e
# Colors
MAGENTA='\033[0;35m'
GREEN='\033[0;32m'
DIM='\033[2m'
RESET='\033[0m'
clear
echo -e "${MAGENTA}"
cat << 'EOF'
♪ ♫
▄▄▄▄▄ ♪
██▀▀▀▀█▄ █▄ ♬
▀██▄ ▄▀ ▄ ██ ▄
▀██▄▄ ██ ██ ███▄███▄ ████▄ ████▄ ▄███▄ ████▄ ██ ██
▄ ▀██▄ ██▄██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▄██
▀██████▀▄▄▀██▀▄██ ██ ▀█▄████▀▄██ ██▄▀███▀▄██ ▀█▄▄▀██▀
♫ ██ ██ ██
▀▀▀ ♪ ▀ ♬ ▀▀▀
EOF
echo -e "${RESET}"
REPO="${SYMPHONY_REPO:-vyrx-dev/dotfiles}"
BRANCH="${SYMPHONY_BRANCH:-main}"
DEST="${SYMPHONY_DEST:-$HOME/dotfiles}"
# Bootstrap dependencies
echo -e "\n${DIM}:: Preparing system${RESET}"
sudo pacman -Syu --noconfirm --needed git stow gum
# Clone or update
echo
if [[ -d "$DEST/.git" ]]; then
echo -e "${DIM} Updating dotfiles...${RESET}"
git -C "$DEST" pull --ff-only || true
else
echo -e "${DIM} Cloning from github.com/${REPO}...${RESET}"
rm -rf "$DEST"
git clone "https://github.com/${REPO}.git" "$DEST"
fi
# Switch branch if needed
if [[ "$BRANCH" != "main" ]]; then
git -C "$DEST" fetch origin "$BRANCH"
git -C "$DEST" checkout "$BRANCH"
fi
# Verify clone worked
if [[ ! -f "$DEST/install.sh" ]]; then
echo -e "\n${MAGENTA} ✗${RESET} Clone failed - install.sh not found"
exit 1
fi
echo -e "${GREEN} ✓${RESET} Repository ready"
echo
cd "$DEST"
source ./install.sh