summaryrefslogtreecommitdiff
path: root/Master/bin/powerpc-aix/cef5pdflatex
blob: bd398e0240c343177416cec696e01d0f04d932e6 (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

cef5conv < "$tex" > "$aux" && eval pdflatex "$argv" "\$aux"

# EOF