summaryrefslogtreecommitdiff
path: root/lib/sbin/ConvertFigures
blob: 73dadbee9ab39a32c643a62a675aced6db9b5551 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /bin/sh

if [ ! -n "$1" ]
then
  figpath="."
else
 figpath=$1
fi

files=`find ${figpath} -type f -name "*.pdf"`

if [ -n "${files}" ]; then
  echo "  Converting figures to postscript"
fi

for i in $files; do
  psfilename=`echo $i | sed s/.pdf$/.ps/`
  if [ "$i" != "documentation.pdf" ] && [ ! -e $psfilename ]; then
    echo "   " `basename $i` " -> " `basename $psfilename`
    pdf2ps $i $psfilename
  fi
done