Add basic site generation scripts.

This commit is contained in:
2016-08-26 15:26:30 +02:00
parent 55d7c06a4f
commit ad910dafcc
2 changed files with 118 additions and 0 deletions

18
scripts/transform-site.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/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