From 611bee7dfb28ce68044ba062fa3e012ba1b19829 Mon Sep 17 00:00:00 2001 From: Matt Rude Date: Sun, 26 Jun 2011 00:19:06 -0500 Subject: renamed: do-build-site -> build-site.sh --- scripts/build-site.sh | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++ scripts/do-build-site | 63 --------------------------------------------------- scripts/do-newntpstat | 2 +- 3 files changed, 64 insertions(+), 64 deletions(-) create mode 100755 scripts/build-site.sh delete mode 100755 scripts/do-build-site (limited to 'scripts') diff --git a/scripts/build-site.sh b/scripts/build-site.sh new file mode 100755 index 0000000..b4710f0 --- /dev/null +++ b/scripts/build-site.sh @@ -0,0 +1,63 @@ +#!/bin/sh + +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 "
+

time.mattrude.com — Readme File

+
+

time.mattrude.com / documentation / readme /

" >> $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 + +echo "

Time Server Hosts

+" >> out.template + +for X in `cat /var/www/time.mattrude.com/rrd/list-of-systems` +do + sed -e s/POOL/$X/g $TEMPLATESDIR/template >> out.template +done + +sync +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` +do + mkdir -p $POOLPAGE/$X + cat /dev/null > out.template + sed -e s/POOL/$X/g $TEMPLATESDIR/template-host >> out.template + sync + cat out.template $TEMPLATESDIR/tail > $X/index.html + rm -f out.template + for a in clients offset jitter frequency sjit cjit wander disp + do + mkdir -p $POOLPAGE/$X/$a + 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/tail > $X/$a/index.html + rm -f out.template + done +done +chown -R apache:apache $POOLPAGE diff --git a/scripts/do-build-site b/scripts/do-build-site deleted file mode 100755 index b4710f0..0000000 --- a/scripts/do-build-site +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/sh - -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 "
-

time.mattrude.com — Readme File

-
-

time.mattrude.com / documentation / readme /

" >> $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 - -echo "

Time Server Hosts

-" >> out.template - -for X in `cat /var/www/time.mattrude.com/rrd/list-of-systems` -do - sed -e s/POOL/$X/g $TEMPLATESDIR/template >> out.template -done - -sync -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` -do - mkdir -p $POOLPAGE/$X - cat /dev/null > out.template - sed -e s/POOL/$X/g $TEMPLATESDIR/template-host >> out.template - sync - cat out.template $TEMPLATESDIR/tail > $X/index.html - rm -f out.template - for a in clients offset jitter frequency sjit cjit wander disp - do - mkdir -p $POOLPAGE/$X/$a - 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/tail > $X/$a/index.html - rm -f out.template - done -done -chown -R apache:apache $POOLPAGE diff --git a/scripts/do-newntpstat b/scripts/do-newntpstat index 3bc9eda..42851be 100755 --- a/scripts/do-newntpstat +++ b/scripts/do-newntpstat @@ -36,4 +36,4 @@ ${RRD_BIN}/rrdtool create ../rrd/$1.rrd --step 300 \ RRA:MIN:0.5:288:797 echo $1 >> ../rrd/list-of-systems -./do-build-site +./build-site.sh -- cgit v1.2.3-59-ga6da