summaryrefslogtreecommitdiff
path: root/ics-openvpn-stripped/main/lzo/util/overlap.sh
blob: 8f3b16b13bae0fe4c097121dfc2e7e4608c96b64 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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-2014 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