]> Sergey Matveev's repositories - meta4ra.git/blobdiff - contrib/mk-meta4
*-hashes-detect, *-hash, *-check -stdin/-all-hashes, optional builtins
[meta4ra.git] / contrib / mk-meta4
diff --git a/contrib/mk-meta4 b/contrib/mk-meta4
new file mode 100755 (executable)
index 0000000..b95a718
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/sh -e
+
+ext=meta4
+opts="$@"
+hashes="${META4RA_HASHES:-`meta4ra-hashes-detect`}"
+find . -type f -maxdepth 1 -not -name "*.$ext" | while read f ; do
+    f="${f#./}"
+    [ "$f" != README ] || continue
+    [ ! -s "$f.$ext" ] || continue
+    pv --wait --name "$f" "$f" |
+    meta4ra-create $opts -hashes "$hashes" -fn "$f" -mtime "$f" > "$f".$ext
+done