openbsd-webzine/issues/tools/compress_static.sh

14 lines
238 B
Bash
Executable File

#!/bin/sh
die() {
echo "$1"
exit 1
}
test -d ../public/ || die "You must run this from openbsd-webzine/current"
find ../public/ -name '*.html' -or -name '*.xml' | while read file
do
gzip -9 -c "${file}" > "${file}.gz"
done