updateAmda
2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
#!/bin/bash
# --install | -i ; --with-remote | -r ; --generate-param-args | -a ;
# --spase-synchro | -s ; --clean-new-meta | -c ; --help | -h;
. updateEnv.sh
for option in $@
do
case $option in
--install | -i) INSTALL=1
;;
--with-remote | -r) REMOTE=1
;;
--generate-param-args | -a) PARAM_INFO=1
;;
--spase-synchro | -s) SYNCHRO=1
;;
--clean-new-meta | -c) CLEAN_NEWMETA=1
;;
--help | -h) echo "updateAmda --install | -i ; --with-remote | -r ; --generate-param-args | -a ; --spase-synchro | -s ; --clean-new-meta | -c ; --help | -h;"
echo "updateAmda without args : update only"
exit
;;
*) echo "Invalid option" $option
exit
;;
esac
done
#Please export DDUSER and DDPASS in the shell !!!!
if [ $PARAM_INFO ] && [[ -z ${DDUSER+x} || -z ${DDPASS+x} ]]
then
echo "Warning : DDUSER and DDPASS should be defined to generate params info"
echo "No params info generation will be done!!!"
unset PARAM_INFO
#export DDUSER=XXXX
#export DDPASS=XXXX
fi
# In the case of SPASE synchro export SPASEUSER
if [ -z ${SPASEUSER+x} ] && [ $SYNCHRO ]
then
echo "SPASEUSER should be defined to SYNCHRO SPASE Registry"
echo "No SYNHRO wil be done!!!"
#export SPASEUSER=XXXX
unset SYNCHRO
fi
if [ $INSTALL ]
then
echo "Installing...."
echo "cleaning in NEWMETA.."
cleanNewMetaLight
echo "clean in NEWMETA : done"
echo "cleaning in AMDA_IHM/generic_data AMDA_Kernel/config..."
cleanExistingInstallation
echo "clean in AMDA_IHM/generic_data AMDA_Kernel/config : done"
echo "making Amda From Spase..."
if [ $SYNCHRO ]
then
php $AMDA_SPASE_INTERFACE/makeAmdaFromSpase.php "synchro"
else
php $AMDA_SPASE_INTERFACE/makeAmdaFromSpase.php
fi
echo "make Amda From Spase : done"
echo "making Tree..."
php $AMDA_SPASE_INTERFACE/makeTree.php
echo "make Tree : done"
echo "copying 2 amda..."
cp2amda
echo "copy 2 amda : done"
echo "making Orbits..."
makeOrbits
echo "make Orbits : done"
# Update StartStop only
else
echo "Updating...."
if [ $SYNCHRO ]
then
php $AMDA_SPASE_INTERFACE/updateStartStop.php 'synchro'
else
php $AMDA_SPASE_INTERFACE/updateStartStop.php 'synchro'
fi
echo 'update in NEWMETA/dd_missions: done'
echo "making Tree..."
php $AMDA_SPASE_INTERFACE/makeTree.php
echo "make Tree : done"
if [ -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ] && [ -e $AMDA_SPASE_INTERFACE/LocalParams.xml ]
then
cp $AMDA_SPASE_INTERFACE/LocalParams.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData
fi
echo 'copy 2 amda : done'
fi
if [ $PARAM_INFO ]
then
echo "Generating param info...."
cleanNewMetaAll
generate_param_info
echo "generate info for arguments : done"
fi
if [ $CLEAN_NEW_META ]; then cleanNewMetaLight; fi
if [ $REMOTE ]
then
echo "making Remote"
makeRemote
echo "make Remote : done"
fi