~ salmonella-environment-setup (master) 89c15e8c53661c6a685c74c31189653aaea3a716
commit 89c15e8c53661c6a685c74c31189653aaea3a716 Author: Mario Domenech Goulart <mario@parenteses.org> AuthorDate: Fri Jan 1 12:10:56 2021 +0100 Commit: Mario Domenech Goulart <mario@parenteses.org> CommitDate: Fri Jan 1 12:10:56 2021 +0100 Add utils/regen-reports.sh diff --git a/utils/regen-reports.sh b/utils/regen-reports.sh new file mode 100644 index 0000000..3b79cbb --- /dev/null +++ b/utils/regen-reports.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +# This script regenerates salmonella reports. +# +# Inputs: any file in the directory where reports are published (e.g., +# salmonella-report.tar.gz, salmonella.log.bz2). Multiple inputs are +# accepted. + +set -ex + +CHICKEN_BINDIR=$HOME/local/chicken-5/bin + +for r "$@"; do + dir=$(dirname "$r") + ( + cd "$dir" + if [ -e salmonella.log.bz2 ]; then + bzip2 -d salmonella.log.bz2 + "$CHICKEN_BINDIR"/salmonella-html-report salmonella.log salmonella-report + rm -f salmonella-report.tar.gz + tar czf salmonella-report.tar.gz salmonella-report + rm -rf salmonella-report + bzip2 -9 salmonella.log + fi + ) +doneTrap