-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·55 lines (47 loc) · 2.19 KB
/
Copy pathinstall.sh
File metadata and controls
executable file
·55 lines (47 loc) · 2.19 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
#!/usr/bin/env bash
# Bootstrap installer — safe to pipe into bash:
# curl -fsSL https://raw.githubusercontent.com/KUKARAF/devpod/main/install.sh | bash
set -e
REPO="https://github.com/KUKARAF/devpod.git"
DOTFILES="$HOME/.config/dotfiles"
# ── 1. Clone or update ────────────────────────────────────────────────────────
if [ -d "$DOTFILES/.git" ]; then
echo "Dotfiles already present at $DOTFILES — pulling latest..."
git -C "$DOTFILES" pull --ff-only
else
echo "Cloning $REPO → $DOTFILES ..."
git clone "$REPO" "$DOTFILES"
fi
# ── 2. Stow ───────────────────────────────────────────────────────────────────
if ! command -v stow &>/dev/null; then
echo "Error: 'stow' not found. Install it first (apt install stow / rpm-ostree install stow)." >&2
exit 1
fi
echo "Stowing dotfiles..."
stow -t ~ --adopt -d "$DOTFILES" .
# ── 3. Distro-specific prerequisites ─────────────────────────────────────────
if [ ! -f /etc/os-release ]; then
echo "Warning: /etc/os-release not found — skipping prerequisites." >&2
exit 0
fi
. /etc/os-release
case "$ID" in
fedora)
if [ -f /run/ostree-booted ]; then
echo "Detected Fedora Silverblue/Kinoite — running Silverblue prerequisites..."
else
echo "Detected Fedora (mutable) — running Silverblue prerequisites..."
fi
bash "$DOTFILES/.tools/install_silverblue.sh"
;;
debian|ubuntu|linuxmint|pop|neon|elementary|zorin|kali)
echo "Detected Debian-based distro ($ID) — running Debian prerequisites..."
bash "$DOTFILES/.tools/debian_prerequisites_install.sh"
;;
*)
echo "Unknown distro '$ID' — skipping prerequisites."
echo "You can run the appropriate script manually from $DOTFILES/.tools/"
;;
esac
echo ""
echo "Done! Open a new shell (or source ~/.bashrc) for all changes to take effect."