Statistics
| Revision:

svn-gvsig-desktop / tags / v1_11_0_Build_1301 / install / scripts / appendContributionsToInstallWin.sh @ 43637

History | View | Annotate | Download (1.5 KB)

1 34477 fdiaz
#!/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
			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
#echo "cat install_template.xml | gawk '{ gsub( \"<!-- OTRAS EXTENSIONES -->\", \"$xml\" ); print }'" > install.xml
57
#cat install_template.xml | gawk '{ gsub( "<!-- OTRAS EXTENSIONES -->", $xml ); print }' > install.xml
58
59
while read line
60
do
61
	#if [  "$line" = "    <!-- OTRAS EXTENSIONES -->" ];then
62
	if [  "$line" = "<!-- OTRAS EXTENSIONES -->" ];then
63
		echo $xml
64
	else
65
		echo $line
66
	fi
67
done < install_15_template.xml >install_15.xml
68
69
cd ..
70
if [ -d "$PREV_INSTALL" ]; then
71
	rm -r $PREV_INSTALL;
72
	echo "Deleted \"$PREV_INSTALL\" ."
73
fi;