summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/mk-darcs-weak-hash4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/mk-darcs-weak-hash b/script/mk-darcs-weak-hash
new file mode 100644
index 0000000..0836354
--- /dev/null
+++ b/script/mk-darcs-weak-hash
@@ -0,0 +1,4 @@
+#!/usr/bin/env dash
+base_dir=$(cd -- "$(dirname -- "$0")/.." && pwd)
+darcs show repo \
+ | awk '/^[[:space:]]*Weak Hash:/ { sub(/^[[:space:]]*Weak Hash:[[:space:]]*/, "", $0); printf $0 }' > "$base_dir/_darcs/weak_hash"