Blame view

update_amda/cp2amda 2.08 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

cb36b2fe   Elena.Budnik   proper dirs perms
7
8
9
10
if [ ! -d "$LocalData" ]; then
	mkdir -m 775 $LocalData
fi

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

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

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

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

a0ca0101   Elena.Budnik   permissions dir
37
# copy all parameter descriptions 
99ae8744   Benjamin Renard   Use config variab...
38
if [ ! -d "$PARAMS_LOCALDB_DIR" ]; then
a0ca0101   Elena.Budnik   permissions dir
39
	mkdir -m 775 $PARAMS_LOCALDB_DIR
0577d36f   Elena.Budnik   new location for ...
40
fi  
99ae8744   Benjamin Renard   Use config variab...
41
cp $NEWMETA/final/*.xml  $PARAMS_LOCALDB_DIR
4873699c   Elena.Budnik   args generation f...
42
43

# if internal parameters not shown in the tree exist => copy them to AMDA Installation without processing
99ae8744   Benjamin Renard   Use config variab...
44
45
if [ -d "$AMDAINTERNALDIR/INTERNAL_PARAM_DEF" ]; then
	cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/*  $PARAMS_LOCALDB_DIR
698cdda6   Elena.Budnik   revert commit
46
	#cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/*.xml  $NEWMETA/final
4873699c   Elena.Budnik   args generation f...
47
48
fi 

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

99ae8744   Benjamin Renard   Use config variab...
60
61
62
if [ -d "$AMDAINTERNALDIR/HELP_PREDEFINED/img" ]; then
	if [ ! -d "$HelpAuto/img" ]; then
		mkdir $HelpAuto/img
4c77b9b1   Elena.Budnik   final update
63
	fi
99ae8744   Benjamin Renard   Use config variab...
64
	cp $AMDAINTERNALDIR/HELP_PREDEFINED/img/*   $HelpAuto/img
4c77b9b1   Elena.Budnik   final update
65
66
67
fi

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

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