Files
dotfiles/install.sh
T

12 lines
369 B
Bash
Executable File

#!/usr/bin/env bash
# Idempotent install — symlinks files from this repo into $HOME.
set -euo pipefail
SRC=$(cd "$(dirname "$0")" && pwd)
mkdir -p ~/.config
while IFS= read -r f; do
rel=${f#"$SRC/home/"}
mkdir -p "$HOME/$(dirname "$rel")"
ln -sf "$SRC/home/$rel" "$HOME/$rel"
done < <(find "$SRC/home" -mindepth 1 -type f)
echo "dotfiles linked from $SRC/home"