2020-02-02 17:40:52 +00:00
|
|
|
#!/usr/bin/env zsh
|
2016-11-09 13:09:59 +00:00
|
|
|
|
2020-02-09 09:01:02 +00:00
|
|
|
# We need the environment to be able to symlink files accordingly
|
2020-02-02 18:50:53 +00:00
|
|
|
case "$1" in
|
|
|
|
desktop)
|
|
|
|
EXTENSION="desktop"
|
|
|
|
;;
|
|
|
|
thinkpad)
|
|
|
|
EXTENSION="thinkpad"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-02-02 17:40:52 +00:00
|
|
|
for d in $(find -- */ -maxdepth 0 -type d | cut -f1 -d '/'); do
|
|
|
|
echo "Linking $d..."
|
|
|
|
(stow -t "$HOME" "$d")
|
2016-11-09 13:09:59 +00:00
|
|
|
done
|
2020-02-02 17:40:52 +00:00
|
|
|
|
2020-02-02 18:50:53 +00:00
|
|
|
if [ ! -z "$EXTENSION" ]; then
|
|
|
|
echo "\n\nDon't forget to symlink these files:\n\n"
|
|
|
|
find ~ \( -type l -o -type f \) -name "*.$EXTENSION" -exec ls -al {} \;
|
|
|
|
fi
|