#! /bin/bash if [ -z "$1" ]; then echo "Expected /includes/head.html file as 1st arg." exit 1 fi if [ -z "$2" ]; then echo "Expected /includes/nav.html file as 2nd arg." exit 1 fi if [ -z "$3" ]; then echo "Expected /includes/footer.html file as 3rd arg." exit 1 fi HEADER=$1 NAV_BAR=$2 FOOTER=$3 if [ ! -f $HEADER ]; then echo $HEADER " does not exist" exit 1 fi if [ ! -f $NAV_BAR ]; then echo $NAV_BAR " does not exist" exit 1 fi if [ ! -f $FOOTER ]; then echo $FOOTER " does not exist" exit 1 fi python gendoc.py perl -MFile::Slurp -pi -e 'BEGIN { $header = read_file("'$HEADER'") } s##$header #' gen/specification.html gen/howtos.html perl -MFile::Slurp -pi -e 'BEGIN { $nav = read_file("'$NAV_BAR'") } s##
$nav
#' gen/specification.html gen/howtos.html perl -MFile::Slurp -pi -e 'BEGIN { $footer = read_file("'$FOOTER'") } s##
$footer
#' gen/specification.html gen/howtos.html