#!/bin/bash set -eu trace_type=$1 patch=traces/${trace_type}.patch # To update these patches: # - add the tracing code you need to the source files # - run "git diff src > traces/foo.patch" d=$(mktemp -d) git apply ${patch} for variant_dir in test/{i,ii}-{128,192,256} do make -C ${variant_dir} ${trace_type} done cp results/{i,ii}-{128,192,256}/${trace_type}-*.txt ${d} tar czf results/${trace_type}.tgz -C ${d} . rm -r ${d} git apply --reverse ${patch}