summaryrefslogtreecommitdiff
path: root/Master/bin/sparc-solaris/cefspdflatex
blob: 1985eebe5c816c861232e0ba55abd621fddf9774 (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] latex-file"
  exit 1;;
*)
  aux=`expr "X$tex" : 'X\(.*\)\.[^/]*$' \| "X$tex" : 'X\(.*\)'`.cjk;;
esac

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

# EOF