Statistics
| Revision:

svn-gvsig-desktop / trunk / install / scripts / appendContributionsToInstall.sh @ 34677

History | View | Annotate | Download (1.31 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
		if [ -f $i/package.info ];then
34
			unset code
35
			unset name
36
			unset description
37
                        set +e
38
			source $i/package.info
39
                        set -e
40
		else 
41
			name="$i"
42
			description="$i"
43
			code="$i"
44
		fi
45
		xml="$xml
46

    
47
    <pack name=\"${name:-$i}\" required=\"no\" >
48
	  <description>${description:-$i}</description>
49
      <file targetdir=\"\$INSTALL_PATH/bin/gvSIG/extensiones/\" src=\"extensiones/${code:-$i}\" override=\"true\"/>
50
	</pack>
51
"	
52
	fi
53
done
54

    
55
echo "RESULTADO: $xml"
56
cd ..
57

    
58
while read line
59
do
60
	#if [  "$line" = "    <!-- OTRAS EXTENSIONES -->" ];then
61
	if [  "$line" = "<!-- OTRAS EXTENSIONES -->" ];then
62
		echo $xml
63
	else
64
		echo $line
65
	fi
66
done < install_template.xml >install.xml
67

    
68
cd ..
69
if [ -d "$PREV_INSTALL" ]; then
70
	rm -r $PREV_INSTALL;
71
	echo "Deleted \"$PREV_INSTALL\" ."
72
fi;