summaryrefslogtreecommitdiff
path: root/language/thai/thailatex/scripts/sync-babel
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /language/thai/thailatex/scripts/sync-babel
Initial commit
Diffstat (limited to 'language/thai/thailatex/scripts/sync-babel')
-rw-r--r--language/thai/thailatex/scripts/sync-babel23
1 files changed, 23 insertions, 0 deletions
diff --git a/language/thai/thailatex/scripts/sync-babel b/language/thai/thailatex/scripts/sync-babel
new file mode 100644
index 0000000000..2f12dcf578
--- /dev/null
+++ b/language/thai/thailatex/scripts/sync-babel
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Patch/unpatch thailatex babel.sty with that of tetex
+# Written by Theppitak Karoonboonyanan <thep@linux.thai.net>
+# License: GPL
+
+BABELSTY=`kpsewhich babel.sty`
+
+if [ "x$BABELSTY" = "x" ]; then
+ echo "Cannot find babel.sty to update"
+ exit 1
+fi
+
+echo "Updating $BABELSTY"
+
+sed -i -e '/thai.ldf/d' $BABELSTY
+
+THAILDF=`kpsewhich thai.ldf`
+
+if [ "x$THAILDF" != "x" ]; then
+ sed -i -e '/turkish/i\
+\\DeclareOption{thai}{\\input{thai.ldf}}' $BABELSTY
+fi
+