1#!/bin/bash 2 3set -e 4 5. amalgamate.sh 6 7g++ tests/miniz_tester.cpp tests/timer.cpp amalgamation/miniz.c -o miniz_tester -I. -ggdb -O2 8 9for i in 1 2 3 4 5 6 10do 11 gcc examples/example$i.c amalgamation/miniz.c -o example$i -lm -I. -ggdb 12done 13 14mkdir -p test_scratch 15if ! test -e "test_scratch/linux-4.8.11" 16then 17 cd test_scratch 18 wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.8.11.tar.xz -O linux-4.8.11.tar.xz 19 tar xf linux-4.8.11.tar.xz 20 cd .. 21fi 22 23cd test_scratch 24../miniz_tester -v a linux-4.8.11 25../miniz_tester -v -r a linux-4.8.11 26../miniz_tester -v -b -r a linux-4.8.11 27../miniz_tester -v -a a linux-4.8.11 28 29mkdir -p large_file 30truncate -s 5G large_file/lf 31../miniz_tester -v -a a large_file 32