summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/thailatex/scripts/sync-babel
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/source/latex/thailatex/scripts/sync-babel')
-rw-r--r--Master/texmf-dist/source/latex/thailatex/scripts/sync-babel23
1 files changed, 23 insertions, 0 deletions
diff --git a/Master/texmf-dist/source/latex/thailatex/scripts/sync-babel b/Master/texmf-dist/source/latex/thailatex/scripts/sync-babel
new file mode 100644
index 00000000000..2f12dcf5788
--- /dev/null
+++ b/Master/texmf-dist/source/latex/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
+