Merge Debian packaging for release “0.6.1-2”.
[debian_comixcursors.git] / install.bash
blobe3898c495c6c25617c535af7345e4dc136dbbb3e
1 #!/bin/bash
3 # source the global config file
4 source CONFIG
6 # process svg file
8 SED1="sed s/#000000/$OUTLINECOLOR/g"
9 SED2="sed s/stroke-width:20/stroke-width:$OUTLINE/g"
10 SED3="sed s/#999999/$CURSORCOLORHI/g"
11 SED4="sed s/#555555/$CURSORCOLORLO/g"
12 SED5="sed s/#999933/$HILIGHTHI/g"
13 SED6="sed s/#666600/$HILIGHTLO/g"
14 SED7="sed s/#010101/$HAIR/g"
16 # the basic cursors
17 FILES="
18 all-scroll
19 cell
20 col-resize
21 crosshair
22 default
23 e-resize
24 ew-resize
25 grabbing
26 n-resize
27 ne-resize
28 nesw-resize
29 not-allowed
30 ns-resize
31 nw-resize
32 nwse-resize
33 pencil
34 pirate
35 pointer
36 right-arrow
37 row-resize
38 s-resize
39 se-resize
40 sw-resize
41 text
42 up-arrow
43 vertical-text
44 w-resize
45 X-cursor
46 zoom-in
47 zoom-out
51 if [ ! -d build ] ; then mkdir build; fi
52 if [ ! -d tmp ] ; then mkdir tmp; fi
53 if [ ! -d cursors ] ; then mkdir cursors; fi
54 if [ ! -d shadows ] ; then mkdir shadows; fi
57 for f in $FILES; do
58 if [ -f svg/$f.svg ] ; then
59 cat svg/$f.svg | $SED1 | $SED2 \
60 | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
61 ./svg2png.bash $f
62 else
63 echo "skipping $f: no svg file found."
65 done
67 # the pointer combined cursors
69 FILES="
70 alias
71 context-menu
72 copy
73 move
74 no-drop
77 for f in $FILES; do
78 if [ -f svg/$f.svg ] ; then
79 cat svg/$f.svg | $SED1 | $SED2 \
80 | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
81 ./svg2png.bash $f $f -BACKGROUND default -SHADOW move
82 else
83 echo "skipping $f: no svg file found."
85 done
89 if [ ! -d build/help ] ; then
90 mkdir build/help
92 cat svg/help1.svg | $SED1 | $SED2 \
93 | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
94 ./svg2png.bash help -PART 1 -BACKGROUND default -SHADOW move -TIME 2000
95 cat svg/help2.svg | $SED1 | $SED2 \
96 | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
97 ./svg2png.bash help -PART 2 -BACKGROUND default -SHADOW move -TIME 500
100 if [ ! -d build/progress ] ; then
101 mkdir build/progress
103 cat svg/progress.svg | $SED1 | $SED2 \
104 | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
105 for (( i=1; $i < 25; i++ )); do
106 ./svg2png.bash progress -PART $i -BACKGROUND default -SHADOW move
107 patch -f --silent tmp/tmp.svg svg/progress.diff >> /dev/null
108 done
111 if [ ! -d build/wait ] ; then
112 mkdir build/wait
114 cat svg/wait.svg | $SED1 | $SED2 \
115 | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
116 for (( i=1; $i < 37; i++ )); do
117 ./svg2png.bash wait -PART $i
118 patch -f --silent tmp/tmp.svg svg/wait.diff >> /dev/null
119 done
121 # make and install
123 echo "silent make"
124 make -silent
125 echo "silent make install"
126 make -silent install