File: install.bash

package info (click to toggle)
comixcursors 0.6.1-4
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 880 kB
  • ctags: 35
  • sloc: sh: 567; makefile: 87
file content (127 lines) | stat: -rwxr-xr-x 2,518 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/bin/bash

# source the global config file
source CONFIG

# process svg file

SED1="sed s/#000000/$OUTLINECOLOR/g"
SED2="sed s/stroke-width:20/stroke-width:$OUTLINE/g"
SED3="sed s/#999999/$CURSORCOLORHI/g"
SED4="sed s/#555555/$CURSORCOLORLO/g"
SED5="sed s/#999933/$HILIGHTHI/g"
SED6="sed s/#666600/$HILIGHTLO/g"
SED7="sed s/#010101/$HAIR/g"

# the basic cursors
FILES="
all-scroll 
cell 
col-resize 
crosshair 
default 
e-resize 
ew-resize 
grabbing 
n-resize 
ne-resize 
nesw-resize 
not-allowed 
ns-resize 
nw-resize 
nwse-resize 
pencil 
pirate 
pointer 
right-arrow 
row-resize 
s-resize 
se-resize 
sw-resize 
text 
up-arrow 
vertical-text 
w-resize 
X-cursor
zoom-in
zoom-out
"


if [ ! -d build ] ; then mkdir build; fi
if [ ! -d tmp ] ; then mkdir tmp; fi
if [ ! -d cursors ] ; then mkdir cursors; fi
if [ ! -d shadows ] ; then mkdir shadows; fi


for f in $FILES; do 
  if [ -f svg/$f.svg ] ; then
    cat svg/$f.svg | $SED1 | $SED2 \
    | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
    ./svg2png.bash $f
  else
    echo "skipping $f: no svg file found."
  fi
done

# the pointer combined cursors

FILES="
alias
context-menu
copy
move
no-drop
"

for f in $FILES; do 
  if [ -f svg/$f.svg ] ; then
    cat svg/$f.svg | $SED1 | $SED2 \
    | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
    ./svg2png.bash $f $f -BACKGROUND default -SHADOW move
  else
    echo "skipping $f: no svg file found."
  fi
done



if [ ! -d build/help ] ; then
	mkdir build/help
fi
cat svg/help1.svg | $SED1 | $SED2 \
    | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
./svg2png.bash help -PART 1 -BACKGROUND default -SHADOW move -TIME 2000
cat svg/help2.svg | $SED1 | $SED2 \
    | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
./svg2png.bash help -PART 2 -BACKGROUND default -SHADOW move -TIME 500


if [ ! -d build/progress ] ; then
	mkdir build/progress
fi
cat svg/progress.svg | $SED1 | $SED2 \
    | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
for (( i=1; $i < 25; i++ )); do
  ./svg2png.bash progress -PART $i -BACKGROUND default -SHADOW move
  patch -f --silent tmp/tmp.svg svg/progress.diff >> /dev/null
done


if [ ! -d build/wait ] ; then
	mkdir build/wait
fi
cat svg/wait.svg | $SED1 | $SED2 \
    | $SED3 | $SED4 | $SED5 | $SED6 | $SED7 > tmp/tmp.svg
for (( i=1; $i < 37; i++ )); do
  ./svg2png.bash wait -PART $i 
  patch -f --silent tmp/tmp.svg svg/wait.diff >> /dev/null
done

# make and install

echo "silent make"
make -silent
echo "silent make install"
make -silent install