Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
14 | reyssat | 1 | #! /bin/sh |
2 | # |
||
3 | # This script tries to fix the convert background compatibility problem. |
||
4 | # |
||
5 | |||
6 | [ -n "$1" ] || exit 1 |
||
7 | [ -f $1 ] || exit |
||
8 | grep dispose $1 >/dev/null || exit |
||
9 | |||
10 | cd `dirname $0`/../.. |
||
11 | |||
12 | cvdisp='insdraw..processor |
||
13 | insplot..processor |
||
14 | povray' |
||
15 | |||
16 | ############################################ |
||
17 | ## Convert backward non-compatibility fix ## |
||
18 | ############################################ |
||
19 | |||
20 | cp public_html/gifs/en.gif tmp |
||
21 | PATH=chroot/usr/bin:chroot/usr/local/bin:other/bin:$PATH |
||
22 | if convert -dispose Background tmp/en.gif tmp/en.gif 2>/dev/null; then |
||
23 | for f in $cvdisp |
||
24 | do |
||
25 | grep CONVERT_DIS=2 public_html/bin/$f >/dev/null || continue |
||
26 | ed public_html/bin/$f <<@ |
||
27 | ,s/CONVERT_DIS=2/CONVERT_DIS=Background/g |
||
28 | ,w |
||
29 | @ |
||
30 | done |
||
31 | else |
||
32 | for f in $cvdisp |
||
33 | do |
||
34 | grep CONVERT_DIS=Background public_html/bin/$f >/dev/null || continue |
||
35 | ed public_html/bin/$f <<@ |
||
36 | ,s/CONVERT_DIS=Background/CONVERT_DIS=2/g |
||
37 | ,w |
||
38 | @ |
||
39 | done |
||
40 | fi |
||
41 | |||
42 | rm -f tmp/*.gif 2>/dev/null |
||
43 | exit 0 |
||
44 |