cp2amda 2.18 KB
#!/bin/bash

cp $NEWMETA/datasets/*.xml    $AMDAINSTALLATION/AMDA_Kernel/config/DataSetInfo
cp $NEWMETA/instruments/*.xml $AMDAINSTALLATION/AMDA_Kernel/config/InstrumentInfo
cp $NEWMETA/missions/*.xml    $AMDAINSTALLATION/AMDA_Kernel/config/MissionInfo


if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate ]; then
	mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate
fi 

if [ -e $AMDAINTERNALDIR/ParamTemplateList.xml ]; then   
   php $AMDA_SPASE_INTERFACE/mvTemplates.php  
   cp $AMDAINTERNALDIR/ParamTemplateList.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate
 fi
 
 if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase ]; then
	mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase
 fi
 
 cp $NEWMETA/final/*.xml  $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase
 
  # if internal parameters not shown in the tree exist => copy them
 if [ -d $AMDAINTERNALDIR/INTERNAL_PARAM_DEF ]
  then
	cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/*  $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase
  fi 
   
# if special help exitsts => copy it
if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED ] 
 then 
	cp $AMDAINTERNALDIR/HELP_PREDEFINED/*  $NEWMETA/help
 fi
 
 
if [ ! -d $AMDAINSTALLATION/AMDA_IHM/help/auto ]; then
	mkdir $AMDAINSTALLATION/AMDA_IHM/help/auto	
fi 

cp $NEWMETA/help/*    $AMDAINSTALLATION/AMDA_IHM/help/auto

if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED/img ]; then
	if [ ! -d $AMDAINSTALLATION/AMDA_IHM/help/auto/img ]; then
		mkdir $AMDAINSTALLATION/AMDA_IHM/help/auto/img
	fi
	cp $AMDAINTERNALDIR/HELP_PREDEFINED/img/*   $AMDAINSTALLATION/AMDA_IHM/help/auto/img
fi

# copy info for parameter arguments
if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo ]; then
	mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo
fi 

if [ -d $NEWMETA/ParamInfo ] 
 then 
	cp $NEWMETA/ParamInfo/info*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo
 fi 
  
if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ] 
 then
	mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData
 fi

if [ -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ] && [ -e ./LocalParams.xml ]
 then
	mv ./LocalParams.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData
 fi