chiark / gitweb /
get-sig: Improve shell use a bit. Take base directories relative to $HOME.
[bin.git] / build-sig
index 3e46ad9ab5f9e70d84603876b7971fef440e790d..1e80e98dc45a38c535afa8c2ae011146fee8a3a9 100755 (executable)
--- a/build-sig
+++ b/build-sig
@@ -1,8 +1,9 @@
-#!/bin/sh
+#! /bin/sh
 
-for s in $(find ~/.signatures -mindepth 2 -path '*/old/*' -prune -o \
+for s in $(find ~/.signatures -mindepth 1 -path '*/old/*' -prune -o \
+                              -path '*/.svn/*' -prune -o \
                               -type f ! -name '*.dat' ! -name static -print | \
            sort); do
-  strfile $s
-done | perl -ne \
-       '$s += $1 if /There.*?([0-9]+)/; print; END { print "Total: $s\n"; }'
+  strfile "$s"
+done | perl -pe \
+       '$s += $1 if /There.*?([0-9]+)/; END { print "Total: $s\n"; }'