#!/bin/sh

for level in 0 1 2 s 3; do
rpm -ba --define "_optlevel $level" --target i586 ~/RPM/SPECS/bzip2.spec
sudo rpm -Uvh --force ~/RPM/RPMS/i586/bz*-1.0.2-alt7.i586.rpm
sync
echo TEST FOR -O$level
for i in 1 2 3; do 
	time bzcat ~/RPM/SOURCES/openoffice-1.0.2.tar.bz2 >/dev/null
done
done 2>&1 | tee ~/tmp/bzlib-test.txt
