summary refs log tree commit diff
path: root/prune.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xprune.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/prune.sh b/prune.sh
new file mode 100755
index 00000000..2480b7ba
--- /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