debian-btw
debian-btw
https://git.tonybtw.com/debian-btw.git
git://git.tonybtw.com/debian-btw.git
asdf
Diff
diff --git a/configs.txt b/configs.txt
new file mode 100644
index 0000000..a06b783
--- /dev/null
+++ b/configs.txt
@@ -0,0 +1,5 @@
+alacritty|.config/alacritty
+nvim|.config/nvim
+oxwm|.config/oxwm
+picom|.config/picom
+rofi|.config/rofi
diff --git a/dotlink.sh b/dotlink.sh
new file mode 100755
index 0000000..ae81753
--- /dev/null
+++ b/dotlink.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+set -e
+
+DOTFILES="$(cd "$(dirname "$0")" && pwd)"
+LIST="$DOTFILES/configs.txt"
+
+while IFS='|' read -r src dst url; do
+ [ -z "$src" ] && continue
+ [ -z "$dst" ] && continue
+
+ src="$DOTFILES/$src"
+ dst="$HOME/$dst"
+
+ if [ ! -e "$src" ]; then
+ echo "SKIP: $src"
+ continue
+ fi
+
+ [ -L "$dst" ] && rm "$dst"
+ [ -e "$dst" ] && mv "$dst" "$dst.bak"
+
+ mkdir -p "$(dirname "$dst")"
+ ln -s "$src" "$dst"
+ echo "LINK: $dst -> $src"
+done < "$LIST"
+
+echo "Done."