about summary refs log tree commit diff stats
path: root/update_html
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-09-07 10:37:27 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-09-07 10:37:27 -0700
commitf5465e1220d73e237c51897b7d1211ec53b0dc04 (patch)
tree939ee8e57241b8515aede8106c6420e330ace75a /update_html
parent5ccf2653fb7d31b013f77df4e92e964e45c54f8a (diff)
downloadmu-f5465e1220d73e237c51897b7d1211ec53b0dc04.tar.gz
2177
Diffstat (limited to 'update_html')
-rwxr-xr-xupdate_html32
1 files changed, 20 insertions, 12 deletions
diff --git a/update_html b/update_html
index b9a7ad79..08e9a3f4 100755
--- a/update_html
+++ b/update_html
@@ -1,16 +1,24 @@
-#!/bin/bash
+#!/usr/bin/zsh
 # Regenerate html files.
 
-for f in *.cc *.mu
+rm html/**/*.html
+
+process() {
+  vim -c "TOhtml | w | qa" $1
+
+  sed -i 's,<title>\~/mu/,<title>Mu - ,' $1.html
+  sed -i 's,\.html</title>,</title>,' $1.html
+  sed -i 's/^\*.*/* { font-size: 1.05em; }/g' $1.html
+  # tweak contrast
+  sed -i 's/^\.Constant .*/.Constant { color: #00a0a0; }/' $1.html
+  sed -i 's/^\.muControl .*/.muControl { color: #c0a020; }/' $1.html
+  sed -i 's/^\.Comment .*/.Comment { color: #9090ff; }/' $1.html
+  sed -i 's/^\.Delimiter .*/.Delimiter { color: #a04060; }/' $1.html  # not meant to be read/ can be lower-contrast
+
+  mv -i $1.html html/`dirname $1`
+}
+
+for f in *.cc *.mu edit/*.mu
 do
-  vim -c "TOhtml | w | qa" $f
-  mv $f.html html
+  process $f
 done
-sed -i 's,<title>\~/mu/,<title>Mu - ,' html/*.html
-sed -i 's,\.html</title>,</title>,' html/*.html
-sed -i 's/^\*.*/* { font-size: 1.05em; }/g' html/*.html
-# tweak contrast
-sed -i 's/^\.Constant .*/.Constant { color: #00a0a0; }/' html/*.html
-sed -i 's/^\.muControl .*/.muControl { color: #c0a020; }/' html/*.html
-sed -i 's/^\.Comment .*/.Comment { color: #9090ff; }/' html/*.html
-sed -i 's/^\.Delimiter .*/.Delimiter { color: #a04060; }/' html/*.html  # not meant to be read/ can be lower-contrast