summaryrefslogtreecommitdiff
path: root/bin/dot
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dot')
-rwxr-xr-xbin/dot48
1 files changed, 0 insertions, 48 deletions
diff --git a/bin/dot b/bin/dot
deleted file mode 100755
index acb0e64..0000000
--- a/bin/dot
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env bash
-
-get_links()
-{
- find $HOME -not -path "$HOME/dotfiles/*" -type l | while read line; do
- if [[ "$(realpath -q $line)" == "${HOME}/dotfiles/"* ]]; then
- echo $line
- fi
- done
-}
-
-clean()
-{
- get_links | while read link; do
- rm -v ${link}
- done
-}
-
-down()
-{
- source $HOME/dotfiles/.dotmap
- for link in "${!dotmap[@]}"; do
- echo "Removing ${link}."
- rm -rf $link
- done
-}
-
-up()
-{
- source $HOME/dotfiles/.dotmap
- for link in "${!dotmap[@]}"; do
- target=${dotmap[$link]}
- mkdir -p $(dirname ${link})
- echo "Linking $target."
- rm -rf $link && ln -s $target $link
- done
-}
-
-save()
-{
- echo "declare -A dotmap" > .dotmap
- get_links | while read link; do
- echo "dotmap[$link]=$(readlink -f -q $link)" | sed "s#$HOME#"'$HOME#g' >> .dotmap
- done
- sort .dotmap -o .dotmap
-}
-
-$1