Verified Commit e008d96f authored by Bastien Durel's avatar Bastien Durel
Browse files

missing checksize script

parent e1082d01
Pipeline #979 passed with stages
in 4 minutes and 32 seconds
#!/bin/sh
if [ ! -f $2 ]; then exit 0 ; fi
if [ ! -f $1 ]; then exit 0 ; fi
bin=$(stat -c %s $1)
comp=$(stat -c %s $2)
if [ $bin -gt $comp ]; then
## check margin
echo "Compressed file is smaller than original by a factor of $(echo $comp/$bin | bc -l)"
c=$(echo "$bin*99/100" | bc)
if [ $c -gt $comp ]; then
echo "Compression achieved more than 1%"
exit 1
fi
fi
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment