Statistics
| Revision:

svn-gvsig-desktop / tags / tmp_build / install / scripts / appendContributionsToInstallWin.sh @ 34676

History | View | Annotate | Download (1.54 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-win/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
            set +e
39
			source $i/package.info
40
			set -e
41
			
42
		else 
43
			name="$i"
44
			description="$i"
45
			code="$i"
46
		fi
47
		xml="$xml
48

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

    
57
echo "RESULTADO: $xml"
58
cd ..
59
#echo "cat install_template.xml | gawk '{ gsub( \"<!-- OTRAS EXTENSIONES -->\", \"$xml\" ); print }'" > install.xml
60
#cat install_template.xml | gawk '{ gsub( "<!-- OTRAS EXTENSIONES -->", $xml ); print }' > install.xml
61

    
62
while read line
63
do
64
	#if [  "$line" = "    <!-- OTRAS EXTENSIONES -->" ];then
65
	if [  "$line" = "<!-- OTRAS EXTENSIONES -->" ];then
66
		echo $xml
67
	else
68
		echo $line
69
	fi
70
done < install_15_template.xml >install_15.xml
71

    
72
cd ..
73
#if [ -d "$PREV_INSTALL" ]; then
74
#	rm -r $PREV_INSTALL;
75
#	echo "Deleted \"$PREV_INSTALL\" ."
76
#fi;