~ubuntu-branches/ubuntu/trusty/dblatex/trusty

« back to all changes in this revision

Viewing changes to latex/scripts/runpdflatex

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Hoenen
  • Date: 2006-11-18 09:52:18 UTC
  • mfrom: (3.1.2 feisty)
  • Revision ID: james.westby@ubuntu.com-20061118095218-zsibrzxr9w6e2lor
Tags: 0.2-2
Do not depend on script mktexlsr belonging to a non-essential package
in postrm purge. (Urgency set to high due to serious severity.)
Closes: #398776

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
 
3
 
graphics_link()
4
 
{
5
 
  gtemp=""
6
 
  for i in $*; do
7
 
    # Copy locally the graphics
8
 
    if [ -d $i ]; then
9
 
      for i in $i/*.pdf ; do
10
 
        gloc=`basename $i`
11
 
        if [ ! -f $gloc ]; then
12
 
          echo "Link to $gloc"
13
 
          ln -s $i .
14
 
          gtemp="$gtemp $gloc"
15
 
        fi
16
 
      done
17
 
    else
18
 
      echo "Warning: invalid graphic path"
19
 
    fi
20
 
  done
21
 
}
22
 
 
23
 
scriptpath=`dirname $0`;
24
 
 
25
 
# Grab the graphpath option
26
 
get_graphpath()
27
 
{
28
 
  while true
29
 
  do
30
 
    case "$1" in
31
 
    --graphpath) graphpath="$2"; shift;;
32
 
    *) break;;
33
 
    esac
34
 
    shift
35
 
  done
36
 
}
37
 
 
38
 
get_graphpath "$@"
39
 
graphics_link "$graphpath" $scriptpath/../graphics
40
 
 
41
 
$scriptpath/runlatex --tex pdflatex --oxt pdf "$@"
42
 
rc=$?
43
 
 
44
 
# Remove the temporary links
45
 
if [ "$gtemp" != "" ]; then
46
 
  rm $gtemp
47
 
fi
48
 
 
49
 
exit $rc