#!/bin/bash LANGUAGE="en" if [ $1 ] then LANGUAGE=$1; fi if ! [ -d $LANGUAGE ] then echo $LANGUAGE" is not an appropriate locale."; exit; fi echo "Generate documentation for "$LANGUAGE"." cd $LANGUAGE for file in `ls *.t2t` do name=${file:0:${#file}-4} txt2tags -q --encoding utf-8 --css-sugar --style style.css --toc -t xhtml -o ../$name".html" $file txt2tags -q --encoding utf-8 --toc -t txt -o ../$name $file done