Blame view

update_amda/cp2amda 2 KB
4c77b9b1   Elena.Budnik   final update
1
2
#!/bin/bash

99ae8744   Benjamin Renard   Use config variab...
3
4
5
6
SCRIPT=$(readlink -f "$0")
export UPDATEDIR=$(dirname "$SCRIPT")
. $UPDATEDIR/updateEnv.sh

0577d36f   Elena.Budnik   new location for ...
7
# copy all info files
99ae8744   Benjamin Renard   Use config variab...
8
9
if [ ! -d "$DataSetInfo" ]; then
	mkdir $DataSetInfo
0577d36f   Elena.Budnik   new location for ...
10
fi
99ae8744   Benjamin Renard   Use config variab...
11
cp -f $NEWMETA/datasets/*.xml    $DataSetInfo
4c77b9b1   Elena.Budnik   final update
12

99ae8744   Benjamin Renard   Use config variab...
13
14
if [ ! -d $InstrumentInfo ]; then
	mkdir $InstrumentInfo
0577d36f   Elena.Budnik   new location for ...
15
fi
99ae8744   Benjamin Renard   Use config variab...
16
cp -f $NEWMETA/instruments/*.xml $InstrumentInfo
4c77b9b1   Elena.Budnik   final update
17

99ae8744   Benjamin Renard   Use config variab...
18
19
if [ ! -d $MissionInfo ]; then
	mkdir $MissionInfo
0577d36f   Elena.Budnik   new location for ...
20
fi
99ae8744   Benjamin Renard   Use config variab...
21
cp -f $NEWMETA/missions/*.xml    $MissionInfo
4c77b9b1   Elena.Budnik   final update
22

0577d36f   Elena.Budnik   new location for ...
23
# copy all Templates if exist
99ae8744   Benjamin Renard   Use config variab...
24
25
26
if [ -f "$AMDAINTERNALDIR/ParamTemplateList.xml" ]; then
	if [ ! -d "$ParamTemplate" ]; then
		mkdir $ParamTemplate
0577d36f   Elena.Budnik   new location for ...
27
28
	fi
	
99ae8744   Benjamin Renard   Use config variab...
29
30
   php $UPDATEDIR/mvTemplates.php  
   cp $AMDAINTERNALDIR/ParamTemplateList.xml $ParamTemplate
0577d36f   Elena.Budnik   new location for ...
31
32
fi

0577d36f   Elena.Budnik   new location for ...
33
# copy all parameter desctiptions 
99ae8744   Benjamin Renard   Use config variab...
34
35
if [ ! -d "$PARAMS_LOCALDB_DIR" ]; then
	mkdir $PARAMS_LOCALDB_DIR
0577d36f   Elena.Budnik   new location for ...
36
fi  
99ae8744   Benjamin Renard   Use config variab...
37
cp $NEWMETA/final/*.xml  $PARAMS_LOCALDB_DIR
4873699c   Elena.Budnik   args generation f...
38
39

# if internal parameters not shown in the tree exist => copy them to AMDA Installation without processing
99ae8744   Benjamin Renard   Use config variab...
40
41
if [ -d "$AMDAINTERNALDIR/INTERNAL_PARAM_DEF" ]; then
	cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/*  $PARAMS_LOCALDB_DIR
4873699c   Elena.Budnik   args generation f...
42
43
fi 

0577d36f   Elena.Budnik   new location for ...
44
# if special help exitsts => copy it to NEWMETA
99ae8744   Benjamin Renard   Use config variab...
45
if [ -d "$AMDAINTERNALDIR/HELP_PREDEFINED" ]; then 
4c77b9b1   Elena.Budnik   final update
46
	cp $AMDAINTERNALDIR/HELP_PREDEFINED/*  $NEWMETA/help
0577d36f   Elena.Budnik   new location for ...
47
fi
4c77b9b1   Elena.Budnik   final update
48
 
0577d36f   Elena.Budnik   new location for ...
49
# copy all help files
99ae8744   Benjamin Renard   Use config variab...
50
51
if [ ! -d "$HelpAuto" ]; then
	mkdir -p $HelpAuto	
4c77b9b1   Elena.Budnik   final update
52
fi 
99ae8744   Benjamin Renard   Use config variab...
53
cp $NEWMETA/help/*  $HelpAuto
4c77b9b1   Elena.Budnik   final update
54

99ae8744   Benjamin Renard   Use config variab...
55
56
57
if [ -d "$AMDAINTERNALDIR/HELP_PREDEFINED/img" ]; then
	if [ ! -d "$HelpAuto/img" ]; then
		mkdir $HelpAuto/img
4c77b9b1   Elena.Budnik   final update
58
	fi
99ae8744   Benjamin Renard   Use config variab...
59
	cp $AMDAINTERNALDIR/HELP_PREDEFINED/img/*   $HelpAuto/img
4c77b9b1   Elena.Budnik   final update
60
61
62
fi

# copy info for parameter arguments
99ae8744   Benjamin Renard   Use config variab...
63
64
65
if [ -d "$NEWMETA/ParamInfo" ]; then
	if [ ! -d "$PARAMS_LOCALINFO_DIR" ]; then
		mkdir $PARAMS_LOCALINFO_DIR
0577d36f   Elena.Budnik   new location for ...
66
	fi 
99ae8744   Benjamin Renard   Use config variab...
67
	cp $NEWMETA/ParamInfo/info*.xml $PARAMS_LOCALINFO_DIR
fe226876   Benjamin Renard   Merge branch mast...
68
        cp $AMDAINTERNALDIR/PARAM_INFO_PREDEFINED/info*.xml $PARAMS_LOCALINFO_DIR
4c77b9b1   Elena.Budnik   final update
69
70
fi 

0577d36f   Elena.Budnik   new location for ...
71
# copy LocalParams.xml created by makeTree.php to AMDA installation 
99ae8744   Benjamin Renard   Use config variab...
72
73
if [ ! -d "$LocalData" ]; then
	mkdir $LocalData
0577d36f   Elena.Budnik   new location for ...
74
fi
99ae8744   Benjamin Renard   Use config variab...
75
76
77
if [ -d "$LocalData" ] && [ -f "$UPDATEDIR/LocalParams.xml" ]; then
	mv $UPDATEDIR/LocalParams.xml $LocalData
fi