summaryrefslogtreecommitdiff
path: root/app/lzo/util/overlap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'app/lzo/util/overlap.sh')
-rw-r--r--app/lzo/util/overlap.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/app/lzo/util/overlap.sh b/app/lzo/util/overlap.sh
new file mode 100644
index 00000000..727c86f1
--- /dev/null
+++ b/app/lzo/util/overlap.sh
@@ -0,0 +1,27 @@
+#! /bin/sh
+set -e
+
+#
+# usage: util/overlap.sh [directory]
+#
+# This script runs the overlap example program on a complete directory tree.
+#
+# Copyright (C) 1996-2011 Markus Franz Xaver Johannes Oberhumer
+#
+
+OVERLAP="overlap"
+test -x ./examples/overlap && OVERLAP="./examples/overlap"
+test -x ./overlap.exe && OVERLAP="./overlap.exe"
+
+dir="${*-.}"
+
+TMPFILE="/tmp/lzo_$$.tmp"
+rm -f $TMPFILE
+(find $dir/ -type f -print0 > $TMPFILE) || true
+
+cat $TMPFILE | xargs -0 -r $OVERLAP
+
+rm -f $TMPFILE
+echo "Done."
+exit 0
+