Revision 1803 tmp/org.txm.setups/shared/mac/INSTALL

INSTALL (revision 1803)
2 2

  
3 3
VERSION="-TXMVERSION"
4 4

  
5
vercomp () {
6
    echo "test $1 $2"
7
    if [[ $1 == $2 ]]
8
    then
9
        return 0
10
    fi
11
    local IFS=.
12
    local i ver1=($1) ver2=($2)
13
    # fill empty fields in ver1 with zeros
14
    for ((i=${#ver1[@]}; i<${#ver2[@]}; i++))
15
    do
16
        ver1[i]=0
17
    done
18
    for ((i=0; i<${#ver1[@]}; i++))
19
    do
20
        if [[ -z ${ver2[i]} ]]
21
        then
22
            ver2[i]=0
23
        fi
24
        if ((10#${ver1[i]} > 10#${ver2[i]}))
25
        then
26
            return 0
27
        fi
28
        if ((10#${ver1[i]} < 10#${ver2[i]}))
29
        then
30
            return 1
31
        fi
32
    done
33
    return 0
34
}
35

  
36 5
# messages en and fr
37 6
SAY_STARTINSTALL_EN="starting post installation"
38 7
SAY_INSTALLR_EN="installing R and R dependancies"
......
46 15
SAY_SETFILERIGHTS_FR="Réglage des droits de fichiers"
47 16
SAY_DONE_FR="Installation terminée"
48 17

  
49
if [ $LANG == "fr_FR.UTF-8" ];then
50
	SAY_STARTINSTALL=$SAY_STARTINSTALL_FR
51
	SAY_INSTALLR=$SAY_INSTALLR_FR
52
	SAY_CREATESTAMP=$SAY_CREATESTAMP_FR
53
	SAY_SETFILERIGHTS=$SAY_SETFILERIGHTS_FR
54
	SAY_DONE=$SAY_DONE_FR
55
else
56 18
	SAY_STARTINSTALL=$SAY_STARTINSTALL_EN
57 19
	SAY_INSTALLR=$SAY_INSTALLR_EN
58 20
	SAY_CREATESTAMP=$SAY_CREATESTAMP_EN
59 21
	SAY_SETFILERIGHTS=$SAY_SETFILERIGHTS_EN
60 22
	SAY_DONE=$SAY_DONE_EN
61
fi
62 23

  
63
OSVERSION=`sw_vers -productVersion`
64
echo "MAC OS X Version is : $OSVERSION"
65
vercomp $OSVERSION "10.7"
66
if [ $? != 0 ];then
67
	java -version
68
	if [ $? != 0 ];then
69
		echo "** TXM postinstall: failed to install: java is missing."
70
		exit 1
71
	fi
72
fi
73 24

  
74 25
say $SAY_STARTINSTALL
75 26
echo "** TXM postinstall: start post installation"

Also available in: Unified diff