#!/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