diff options
author | Arne Schwabe <arne@rfc2549.org> | 2015-08-10 13:51:40 +0200 |
---|---|---|
committer | Arne Schwabe <arne@rfc2549.org> | 2015-08-10 13:51:40 +0200 |
commit | 98399ed51045871f8d73599322b6947d6b2b80d0 (patch) | |
tree | 28eb352fc1fd89f9c0969cfe0e7c384dee8b17df /main/lzo/util/overlap.sh | |
parent | e6af88b346e9eb5be462429bf9786e7e89ce0e0d (diff) |
Update lzo to 2.09
Diffstat (limited to 'main/lzo/util/overlap.sh')
-rw-r--r-- | main/lzo/util/overlap.sh | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/main/lzo/util/overlap.sh b/main/lzo/util/overlap.sh index 8f3b16b1..2e1ffa4d 100644 --- a/main/lzo/util/overlap.sh +++ b/main/lzo/util/overlap.sh @@ -4,24 +4,32 @@ set -e # # usage: util/overlap.sh [directory] # -# This script runs the overlap example program on a complete directory tree. +# This script runs the overlap example program +# on a complete directory tree. # -# Copyright (C) 1996-2014 Markus Franz Xaver Johannes Oberhumer +# Copyright (C) 1996-2015 Markus Franz Xaver Johannes Oberhumer # -OVERLAP="overlap" -test -x ./examples/overlap && OVERLAP="./examples/overlap" -test -x ./overlap.exe && OVERLAP="./overlap.exe" +OVERLAP="./examples/overlap" +for d in ./examples .; do + for ext in "" .exe .out; do + if test -f "$d/overlap$ext" && test -x "$d/overlap$ext"; then + OVERLAP="$d/overlap$ext" + break 2 + fi + done +done -dir="${*-.}" +dir="${1-.}" TMPFILE="/tmp/lzo_$$.tmp" -rm -f $TMPFILE -(find $dir/ -type f -print0 > $TMPFILE) || true +rm -f "$TMPFILE" +(find "$dir/." -type f -print0 | LC_ALL=C sort -z > "$TMPFILE") || true -cat $TMPFILE | xargs -0 -r $OVERLAP +cat "$TMPFILE" | xargs -0 -r "$OVERLAP" -rm -f $TMPFILE +rm -f "$TMPFILE" echo "Done." exit 0 +# vim:set ts=4 sw=4 et: |