aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xbuild.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index df06791..f85dffe 100755
--- a/build.sh
+++ b/build.sh
@@ -9,7 +9,6 @@ echo "spidering page"
mkdir -p build
wget \
--no-verbose \
- --no-clobber \
--no-host-directories \
--cut-dirs=3 \
--directory-prefix=build \
@@ -17,5 +16,15 @@ wget \
--recursive \
--no-parent \
--page-requisites \
- --convert-links \
- http://localhost/~peter/voc-frontends/31c3/
+ http://localhost/~peter/voc-frontends/31c3/ \
+ http://localhost/~peter/voc-frontends/31c3/404.html
+
+echo "setting <base />-tag"
+find build -name "*.html" -print0 | xargs -0 -exec sed -i 's~<base href="[^"]*" />~<base href="/" />~g';
+
+echo "inserting hidden compiletime marker"
+find build -name "*.html" -print0 | xargs -0 -exec sed -i "s~<!DOCTYPE html>~<!DOCTYPE html>\n<!-- static published at `date` on `uname -n` -->~g";
+
+
+echo "copying .htaccess"
+cp build.htaccess build/.htaccess