dotfiles/scripts/setup_symlinks

30 lines
554 B
Plaintext
Raw Normal View History

2020-06-03 14:31:58 +00:00
#!/bin/sh
DOTS=$(dirname "$0")/..
cd "$DOTS" || (echo "Directory not found: $DOTS"; exit 1)
DOTS="$PWD"
setup_symlinks() {
for source in $(find "$DOTS" -iname "*.symlink")
do
dest="$HOME/.`basename \"${source%.*}\"`"
ln -sf "$source" "$dest"
2020-06-03 14:31:58 +00:00
done
2020-07-25 19:32:16 +00:00
echo "symlinks ✓"
}
2020-06-08 00:16:03 +00:00
2020-07-25 19:32:16 +00:00
setup_configlinks() {
for source in $(find "$DOTS" -iname "*.configlink")
do
dest="$HOME/.config/`basename \"${source%.*}\"`"
ln -sf "$source" "$dest"
2020-07-25 19:32:16 +00:00
done
2020-07-19 23:47:46 +00:00
2020-07-25 19:32:16 +00:00
echo "configlinks ✓"
2020-06-03 14:31:58 +00:00
}
setup_symlinks
2020-07-25 19:32:16 +00:00
setup_configlinks