mirror of
https://github.com/nmasur/dotfiles
synced 2024-12-27 21:34:53 +00:00
32 lines
598 B
Bash
Executable File
32 lines
598 B
Bash
Executable File
#!/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%.*}\"`"
|
|
rm -rf "$dest"
|
|
ln -s "$source" "$dest"
|
|
done
|
|
|
|
echo "symlinks ✓"
|
|
}
|
|
|
|
setup_configlinks() {
|
|
for source in $(find "$DOTS" -iname "*.configlink")
|
|
do
|
|
dest="$HOME/.config/`basename \"${source%.*}\"`"
|
|
rm -rf "$dest"
|
|
ln -s "$source" "$dest"
|
|
done
|
|
|
|
echo "configlinks ✓"
|
|
}
|
|
|
|
setup_symlinks
|
|
setup_configlinks
|
|
|