home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lzo100.zip / lzo-1.00 / util / check.sh < prev    next >
Linux/UNIX/POSIX Shell Script  |  1997-07-08  |  706b  |  35 lines

  1. #! /bin/sh -e
  2.  
  3. #
  4. # usage: util/check.sh [directory]
  5. #
  6. # This script runs lzo_test with all algorithms on a complete directory tree.
  7. # It is not suitable for accurate timings.
  8. #
  9. # Copyright (C) 1996, 1997 Markus Franz Xaver Johannes Oberhumer
  10. #
  11.  
  12. dir=${1-"."}
  13.  
  14. LZO_FLAGS="-q -n2"
  15.  
  16. TMPFILE="./lzo_chk1.tmp"
  17. rm -f $TMPFILE
  18. find $dir -type f -print > $TMPFILE
  19.  
  20. ## methods=`./lzo_test -m | sed -n 's/^ *-m\([0-9]*\).*/\1/p'`
  21. methods="21 31 1 2 3 4 5 6 7 8 9 11 12 13 14 15 16 17 18 19 61 71 81"
  22. methods="$methods 111 115"
  23. methods="$methods 921 931 901 911"
  24. methods="$methods 902 912 942 962 972 982"
  25.  
  26. for i in $methods; do
  27.     cat $TMPFILE | ./lzo_test -m${i} -@ $LZO_FLAGS
  28. done
  29.  
  30. rm -f $TMPFILE
  31.  
  32. echo Done.
  33. exit 0
  34.  
  35.