summaryrefslogtreecommitdiff
path: root/Master/bin/i386-darwin/gbkpdflatex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/bin/i386-darwin/gbkpdflatex')
-rwxr-xr-xMaster/bin/i386-darwin/gbkpdflatex26
1 files changed, 26 insertions, 0 deletions
diff --git a/Master/bin/i386-darwin/gbkpdflatex b/Master/bin/i386-darwin/gbkpdflatex
new file mode 100755
index 00000000000..6cdb3cfee51
--- /dev/null
+++ b/Master/bin/i386-darwin/gbkpdflatex
@@ -0,0 +1,26 @@
+#! /bin/sh
+
+n=1
+argv=
+
+# get last argument
+while test 1 -lt $#; do
+ eval argv$n=\$1
+ argv="$argv \"\$argv$n\""
+ n=`expr $n + 1`
+ shift
+done
+
+# replace extension with .cjk or append .cjk if there is no extension
+tex=$1
+case $tex in
+""|*.cjk)
+ echo >&2 "Usage: $0 [options] pdflatex-file"
+ exit 1;;
+*)
+ aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;;
+esac
+
+extconv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux"
+
+# EOF