summary refs log tree commit diff
path: root/prune.sh
diff options
context:
space:
mode:
authorC. McEnroe <programble@gmail.com>2015-11-06 15:31:59 -0500
committerC. McEnroe <programble@gmail.com>2015-11-06 15:31:59 -0500
commitbf1950578519d01e469e36b49fcdbbe2baf1d250 (patch)
tree3a3e8cb49020194e4b8c75ad6dfb50f9d348842f /prune.sh
parentUpdate vendored Gruvbox colorscheme (diff)
downloadsrc-bf1950578519d01e469e36b49fcdbbe2baf1d250.tar.gz
src-bf1950578519d01e469e36b49fcdbbe2baf1d250.zip
Add prune script
Diffstat (limited to 'prune.sh')
-rwxr-xr-xprune.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/prune.sh b/prune.sh
new file mode 100755
index 0000000..2480b7b
--- /dev/null
+++ b/prune.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# Remove symbolic links in ~ to files that no longer exist.
+
+set -e
+
+paths=$(find -L ~ -type l -lname "$PWD/*")
+
+for path in $paths; do
+  rm $path
+  echo $path
+done