summaryrefslogtreecommitdiff
path: root/install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh23
1 files changed, 17 insertions, 6 deletions
diff --git a/install.sh b/install.sh
index 94d4e27..bc33b46 100755
--- a/install.sh
+++ b/install.sh
@@ -5,11 +5,10 @@ REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TMP_ERR="$(mktemp)"
trap 'rm -f "$TMP_ERR"' EXIT
-# Packages whose config lives in a well-formed directory (stowable from repo root)
-STOW_PKGS=(
- darkman doom fastfetch foot gtk matugen mpv niri nvim rmpc starship
- tmux vicinae wallust waybar xdg-desktop-portal yazi zshrc
-)
+# The .config tree is stowed into $HOME/.config
+CONFIG_PKG=".config"
+# Remaining home-dotfile packages (stowed into $HOME)
+HOME_PKGS=( zshrc )
# Empty portage dirs, recreated because git does not track empty directories
PORTAGE_EMPTY_DIRS=(
@@ -44,7 +43,19 @@ need_stow() {
stow_dotfiles() {
cd "$REPO_DIR"
local ok=0 fail=0
- for pkg in "${STOW_PKGS[@]}"; do
+
+ # .config package -> ~/.config
+ if stow -R -v -t "$HOME/.config" "$CONFIG_PKG" >"$TMP_ERR" 2>&1; then
+ printf ' %s\n' "$(grep '^LINK' "$TMP_ERR" || true)"
+ ok=$((ok + 1))
+ else
+ warn "stow '$CONFIG_PKG' (-> \$HOME/.config) failed — resolve manually:"
+ sed 's/^/ /' "$TMP_ERR" || true
+ fail=$((fail + 1))
+ fi
+
+ # remaining home-dotfile packages -> ~
+ for pkg in "${HOME_PKGS[@]}"; do
if [[ ! -d "$pkg" ]]; then
warn "package dir '$pkg' missing — skipped"
continue