Mostly for deleting it from `locate-all.list`.
--- /dev/null
+#! /bin/sh
+
+if [ -z "$1" -o -n "$3" ]; then
+ echo "Usage: $0 /path/to/repo" >&2
+ exit 1
+fi
+
+start_dir="`pwd`" &&
+path_to_repo="$1" &&
+cd "$path_to_repo" &&
+path_to_repo="`pwd`" &&
+cd "$start_dir" &&
+
+cd "`dirname \"$0\"`" &&
+if ! grep -q "^$path_to_repo\$" locate-all.list; then
+ echo "$path_to_repo" is not a known repository >&2
+ exit 1
+fi
+
+rm -rf "$path_to_repo" &&
+
+tmpfile="`mktemp`" &&
+grep -v "^$path_to_repo\$" locate-all.list > "$tmpfile" &&
+if cmp -s mv "$tmpfile" locate-all.list; then
+ exec rm -f "$tmpfile"
+else
+ exec mv "$tmpfile" locate-all.list
+fi