diff --git a/scripts/matrix-org-gendoc.sh b/scripts/matrix-org-gendoc.sh index 18961046..187e27da 100755 --- a/scripts/matrix-org-gendoc.sh +++ b/scripts/matrix-org-gendoc.sh @@ -1,21 +1,61 @@ #! /bin/bash if [ -z "$1" ]; then - echo "Expected /includes/nav.html file as arg." + echo "Expected /includes/head.html file as 1st arg." exit 1 fi -NAV_BAR=$1 +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 -pi -e 's###' gen/specification.html gen/howtos.html +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##
[matrix]
#' 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 -pi -e 's##
#' gen/specification.html gen/howtos.html +perl -MFile::Slurp -pi -e 'BEGIN { $footer = read_file("'$FOOTER'") } s## +
+
+
+
+
+
+ $footer +
+ + #' gen/specification.html gen/howtos.html