diff options
Diffstat (limited to 'scripts/do-build-site')
-rwxr-xr-x | scripts/do-build-site | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/scripts/do-build-site b/scripts/do-build-site index 1a66d2a..b4710f0 100755 --- a/scripts/do-build-site +++ b/scripts/do-build-site @@ -1,8 +1,26 @@ #!/bin/sh -POOLPAGE=/var/www/time.mattrude.com/status -TEMPLATESDIR=/var/www/time.mattrude.com/scripts/templates +ROOT=/var/www/time.mattrude.com +POOLPAGE=$ROOT/status +TEMPLATESDIR=$ROOT/scripts/templates +DOCUMENTSDIR=$ROOT/documentation + +### Building the README Page ### + +cd $ROOT +rm -f $ROOT/readme.tmp $TEMPLATESDIR/readme.html +markdown $ROOT/README.md > $ROOT/readme.tmp +cat $TEMPLATESDIR/head > $DOCUMENTSDIR/readme.html +echo " <div id="title"> + <h1>time.mattrude.com <i>— Readme File</i></h1> + </div> + <p> <a href="/">time.mattrude.com</a> / <a href="/documentation/">documentation</a> / <strong>readme</strong> / </p>" >> $DOCUMENTSDIR/readme.html +cat $ROOT/readme.tmp $TEMPLATESDIR/tail >> $DOCUMENTSDIR/readme.html +rm -f $ROOT/readme.tmp + + +### Building the Status Pages ### mkdir -p $POOLPAGE cd $POOLPAGE cat /dev/null > out.template @@ -21,7 +39,7 @@ do done sync -cat $TEMPLATESDIR/index-head out.template $TEMPLATESDIR/index-tail > $POOLPAGE/index.html +cat $TEMPLATESDIR/index-head out.template $TEMPLATESDIR/tail > $POOLPAGE/index.html # Build the indexs for the hosts. for X in `cat /var/www/time.mattrude.com/rrd/list-of-systems` @@ -30,7 +48,7 @@ do cat /dev/null > out.template sed -e s/POOL/$X/g $TEMPLATESDIR/template-host >> out.template sync - cat out.template $TEMPLATESDIR/index-tail > $X/index.html + cat out.template $TEMPLATESDIR/tail > $X/index.html rm -f out.template for a in clients offset jitter frequency sjit cjit wander disp do @@ -38,7 +56,7 @@ do cat /dev/null > out.template sed -e s/POOL/$X/g $TEMPLATESDIR/template-by-type |sed -e s/TYPE/$a/g >> out.template sync - cat out.template $TEMPLATESDIR/index-tail > $X/$a/index.html + cat out.template $TEMPLATESDIR/tail > $X/$a/index.html rm -f out.template done done |