cp2amda
2.02 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
#!/bin/bash
SCRIPT=$(readlink -f "$0")
export UPDATEDIR=$(dirname "$SCRIPT")
. $UPDATEDIR/updateEnv.sh
if [ ! -d "$LocalData" ]; then
mkdir -m 775 $LocalData
fi
# copy all info files
if [ ! -d "$DataSetInfo" ]; then
mkdir $DataSetInfo
fi
cp -f $NEWMETA/datasets/*.xml $DataSetInfo
if [ ! -d $InstrumentInfo ]; then
mkdir $InstrumentInfo
fi
cp -f $NEWMETA/instruments/*.xml $InstrumentInfo
if [ ! -d $MissionInfo ]; then
mkdir $MissionInfo
fi
cp -f $NEWMETA/missions/*.xml $MissionInfo
# copy all Templates if exist
if [ -f "$AMDAINTERNALDIR/ParamTemplateList.xml" ]; then
if [ ! -d "$ParamTemplate" ]; then
mkdir $ParamTemplate
fi
php $UPDATEDIR/mvTemplates.php
cp $AMDAINTERNALDIR/ParamTemplateList.xml $ParamTemplate
fi
# copy all parameter descriptions
if [ ! -d "$PARAMS_LOCALDB_DIR" ]; then
mkdir -m 775 $PARAMS_LOCALDB_DIR
fi
cp $NEWMETA/final/*.xml $PARAMS_LOCALDB_DIR
# if internal parameters not shown in the tree exist => copy them to AMDA Installation without processing
if [ -d "$AMDAINTERNALDIR/INTERNAL_PARAM_DEF" ]; then
cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/* $PARAMS_LOCALDB_DIR
fi
# if special help exitsts => copy it to NEWMETA
if [ -d "$AMDAINTERNALDIR/HELP_PREDEFINED" ]; then
cp $AMDAINTERNALDIR/HELP_PREDEFINED/* $NEWMETA/help
fi
# copy all help files
if [ ! -d "$HelpAuto" ]; then
mkdir -p $HelpAuto
fi
cp $NEWMETA/help/* $HelpAuto
if [ -d "$AMDAINTERNALDIR/HELP_PREDEFINED/img" ]; then
if [ ! -d "$HelpAuto/img" ]; then
mkdir $HelpAuto/img
fi
cp $AMDAINTERNALDIR/HELP_PREDEFINED/img/* $HelpAuto/img
fi
# copy info for parameter arguments
if [ -d "$NEWMETA/ParamInfo" ]; then
if [ ! -d "$PARAMS_LOCALINFO_DIR" ]; then
mkdir $PARAMS_LOCALINFO_DIR
fi
cp $NEWMETA/ParamInfo/info*.xml $PARAMS_LOCALINFO_DIR
cp $AMDAINTERNALDIR/PARAM_INFO_PREDEFINED/info*.xml $PARAMS_LOCALINFO_DIR
fi
# copy LocalParams.xml created by makeTree.php to AMDA installation
if [ -d "$LocalData" ] && [ -f "$UPDATEDIR/LocalParams.xml" ]; then
mv $UPDATEDIR/LocalParams.xml $LocalData
fi