#! /bin/sh set -ex dirs="state archive req cert" rm -rf $dirs tmp mkdir -m775 tmp export CA_FAKE_TIME donep=t stage=0 while :; do stage=$(( $stage + 1 )) if [ -e test/stage-$stage.tar.gz ]; then continue; fi case $donep,$stage in t,1) ;; t,*) tar xf test/stage-$(( $stage - 1 )).tar.gz ;; esac donep=nil case $stage in 1) CA_FAKE_TIME="2011-08-23 18:32:45" bin/setup bin/update for i in $(seq 1 50); do bin/add tls-client fake#$i test/fake-reqs/$i.req done bin/check ;; 2) CA_FAKE_TIME="2011-08-24 18:32:45" bin/update bin/check ;; 3) CA_FAKE_TIME="2011-08-30 18:32:45" bin/update bin/check ;; 4) CA_FAKE_TIME="2011-09-03 18:32:45" bin/update bin/revoke fake#13 key-compromise bin/check ;; 5) CA_FAKE_TIME="2011-09-05 18:32:45" bin/update bin/check ;; 6) CA_FAKE_TIME="2011-10-05 18:32:45" bin/update bin/check ;; 7) CA_FAKE_TIME="2011-12-05 18:32:45" bin/update bin/check ;; *) break ;; esac tar cfz test/stage-$stage.tar.gz $dirs done