blob: 0615149c5b957d3b9e0549c57cd38126f8fa351e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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
cefconv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux"
# EOF
|