aboutsummaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorMaZderMind2014-11-09 23:47:50 +0100
committerMaZderMind2014-11-09 23:47:50 +0100
commit53a9bbf58a18b69a46115bd8e66a675313c68135 (patch)
treeb5dc14dfc6353e08c3b2f6692f1f7887553a3bd9 /build.sh
parent1ac82d89098b54cdbf3da66aac1b751cf46b56f0 (diff)
refine build step
Diffstat (limited to 'build.sh')
-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