metanohi/scripts/transform-site.sh

19 lines
399 B
Bash
Executable File

#!/bin/sh
#
# Transform the entire site into something suitable for a web server.
set -e # Exit on first error.
cd "$(dirname "$0")/.."
rm -rf web-serve
mkdir web-serve
for file in $(cd site; find -type f); do
file="$(echo $file | sed -r 's/^\.\/?//')"
dir="$(dirname $file)"
outdir="web-serve/$dir"
mkdir -p "$outdir"
./scripts/transform-file.py "site/$file" "$outdir"
done