#!/bin/bash # Make the site from template and content. MARK=.content.html # merge of template does not work for anything other that current directory #DIRS=". how-to FAQ" DIRS="." FILES= for d in $DIRS do F="$(echo $d/*$MARK)" if [ "$F" != "$d/*$MARK" ] then FILES="$FILES $(echo $d/*$MARK)" fi done if [ "$FILES" = "*$MARK" ] then echo "No content files" 1>&2 exit 1 fi for f in $FILES do html="${f%$MARK}".html merge $f > $html done # One special: ## ## merge FAQ/jena-faq.content.html > jena-faq.html