#!/bin/bash set -e function compile { for file in $(ls *.xml); do echo "Übersetzte $file ..." mdoc $file $TPL echo "Füge Links ein $file ..." if [ -f ${file%xml}link ]; then # es gibt ein vorgefertigtes Linkfile cp ${file%xml}link links.txt else #erzeuge ein Linkfile extract_links.py $file fi insert_links.sh ${file%xml}html done } export PATH="$(pwd)/Internet/bin:$PATH" TPL="$(pwd)/Internet/etc/internet.tpl" cd Internet/html # build replacement sed -i "s/_BUILD/$build/" index.xml compile cd hilfe compile