]> git.lyx.org Git - lyx.git/blob - lib/scripts/convertDefault.sh
Add authors.
[lyx.git] / lib / scripts / convertDefault.sh
1 #! /bin/sh
2
3 # file convertDefault.sh
4 # This file is part of LyX, the document processor.
5 # Licence details can be found in the file COPYING.
6
7 # author Herbert Voß
8
9 # Full author contact details are available in file CREDITS.
10
11 # The default converter if no other has been defined by the user from the
12 # Conversion->Converter tab of the Preferences dialog.
13
14 # The user can also redefine this default converter, placing their
15 # replacement in ~/.lyx/scripts
16
17 # converts an image from $1 to $2 format
18 convert -depth 8 $1 $2
19 if [ $? -ne 0 ]; then
20     exit $?
21 fi
22
23 # It appears that convert succeeded, but we know better than to trust it ;-)
24 # convert is passed strings in the form "FMT:FILENAME", so use the ':' to
25 # delimit the two parts.
26 FILE=`echo $2 | cut -d ':' -f 2`
27
28 # FSTATUS == 0 is the file exists and == 1 if it does not.
29 FSTATUS=0
30 test -f $FILE || FSTATUS=1
31
32 exit $FSTATUS