svn-gvsig-desktop / trunk / install / scripts / appendContributionsToInstall.sh @ 34477
History | View | Annotate | Download (1.28 KB)
1 |
#!/bin/bash |
---|---|
2 |
PREV_INSTALL=prev_install |
3 |
|
4 |
# Si se produce un error, salimos inmediatamente |
5 |
set -e |
6 |
|
7 |
if [ ! -d "$PREV_INSTALL" ]; then |
8 |
echo "Can't find the directory \"$PREV_INSTALL\" ." |
9 |
exit |
10 |
fi; |
11 |
|
12 |
set +e |
13 |
source build.properties 2>/dev/null |
14 |
|
15 |
set -e |
16 |
#echo $MANDATORY_EXTENSIONS |
17 |
|
18 |
|
19 |
EXTENSIONS=",$EXTENSIONS,$MANDATORY_EXTENSIONS," |
20 |
|
21 |
echo $EXTENSIONS |
22 |
|
23 |
xml="" |
24 |
|
25 |
echo "Directorio actual: $PWD" |
26 |
cd instalador-gvSIG-lin/extensiones |
27 |
echo "EXTENSIONS=$EXTENSIONS" |
28 |
for i in * |
29 |
do |
30 |
echo $i |
31 |
if ! expr $EXTENSIONS : ".*,$i,.*" >/dev/null |
32 |
then |
33 |
echo "SE CUMPLE LA CONDICION" |
34 |
if [ -f $i/package.info ];then |
35 |
unset code |
36 |
unset name |
37 |
unset description |
38 |
source $i/package.info |
39 |
else |
40 |
name="$i" |
41 |
description="$i" |
42 |
code="$i" |
43 |
fi |
44 |
xml="$xml |
45 |
|
46 |
<pack name=\"${name:-$i}\" required=\"no\" > |
47 |
<description>${description:-$i}</description> |
48 |
<file targetdir=\"\$INSTALL_PATH/bin/gvSIG/extensiones/\" src=\"extensiones/${code:-$i}\" override=\"true\"/> |
49 |
</pack> |
50 |
" |
51 |
fi |
52 |
done |
53 |
|
54 |
echo "RESULTADO: $xml" |
55 |
cd .. |
56 |
|
57 |
while read line |
58 |
do |
59 |
#if [ "$line" = " <!-- OTRAS EXTENSIONES -->" ];then |
60 |
if [ "$line" = "<!-- OTRAS EXTENSIONES -->" ];then |
61 |
echo $xml |
62 |
else |
63 |
echo $line |
64 |
fi |
65 |
done < install_template.xml >install.xml |
66 |
|
67 |
cd .. |
68 |
if [ -d "$PREV_INSTALL" ]; then |
69 |
rm -r $PREV_INSTALL; |
70 |
echo "Deleted \"$PREV_INSTALL\" ." |
71 |
fi; |