summaryrefslogtreecommitdiff
path: root/docs/generate
diff options
context:
space:
mode:
Diffstat (limited to 'docs/generate')
-rwxr-xr-xdocs/generate24
1 files changed, 21 insertions, 3 deletions
diff --git a/docs/generate b/docs/generate
index 72c2a68..c01cb57 100755
--- a/docs/generate
+++ b/docs/generate
@@ -1,3 +1,21 @@
-#!/bin/sh
-txt2tags --encoding utf-8 --css-sugar --style style.css --toc -t xhtml -o INSTALL.html INSTALL.t2t
-txt2tags --encoding utf-8 --toc -t txt -o ../INSTALL INSTALL.t2t
+#!/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
+