From 0577d36f281155853787f9261a3338e36d50c441 Mon Sep 17 00:00:00 2001 From: Elena.Budnik <ebudnik@irap.omp.eu> Date: Tue, 22 Aug 2017 10:47:32 +0200 Subject: [PATCH] new location for Info files --- update_amda/cleanExistingInstallation | 14 ++++---------- update_amda/cp2amda | 88 ++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------ 2 files changed, 50 insertions(+), 52 deletions(-) diff --git a/update_amda/cleanExistingInstallation b/update_amda/cleanExistingInstallation index 87f4ce8..8b08239 100755 --- a/update_amda/cleanExistingInstallation +++ b/update_amda/cleanExistingInstallation @@ -1,7 +1,10 @@ #!/bin/bash if test $AMDAINSTALLATION/AMDA_IHM/generic_data -then +then + rm $AMDAINSTALLATION/AMDA_IHM/generic_data/MissionInfo/*.xml + rm $AMDAINSTALLATION/AMDA_IHM/generic_data/InstrumentInfo/*.xml + rm $AMDAINSTALLATION/AMDA_IHM/generic_data/DataSetInfo/*.xml rm $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo/*.xml rm $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate/*.xml rm $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase/*.xml @@ -15,15 +18,6 @@ then rm $AMDAINSTALLATION/AMDA_IHM/help/auto/img/* fi -if test $AMDAINSTALLATION/AMDA_Kernel/config -then - rm $AMDAINSTALLATION/AMDA_Kernel/config/DataSetInfo/*.xml - rm $AMDAINSTALLATION/AMDA_Kernel/config/InstrumentInfo/*.xml - rm $AMDAINSTALLATION/AMDA_Kernel/config/MissionInfo/*.xml -else - "check if AMDA_Kernel/config directory exists" -fi - if test $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo then rm -r $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo/src/* diff --git a/update_amda/cp2amda b/update_amda/cp2amda index f88085f..de3b79b 100755 --- a/update_amda/cp2amda +++ b/update_amda/cp2amda @@ -1,44 +1,52 @@ #!/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 +# copy all info files +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/DataSetInfo ]; then + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/DataSetInfo +fi +cp $NEWMETA/datasets/*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/DataSetInfo +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/InstrumentInfo ]; then + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/InstrumentInfo +fi +cp $NEWMETA/instruments/*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/InstrumentInfo -if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate ]; then - mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate -fi +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/MissionInfo ]; then + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/MissionInfo +fi +cp $NEWMETA/missions/*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/MissionInfo -if [ -e $AMDAINTERNALDIR/ParamTemplateList.xml ]; then +# copy all Templates if exist +if [ -e $AMDAINTERNALDIR/ParamTemplateList.xml ]; then + if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate ]; then + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate + fi + php ./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 - - # if internal parameters not shown in the tree exist => copy them - if [ -d $AMDAINTERNALDIR/INTERNAL_PARAM_DEF ] - then +fi + +# if internal parameters not shown in the tree exist => copy them to NEWMETA +if [ -d $AMDAINTERNALDIR/INTERNAL_PARAM_DEF ]; then cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/* $NEWMETA/final/ - fi - - cp $NEWMETA/final/*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase - - -# if special help exitsts => copy it -if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED ] - then +fi + +# copy all parameter desctiptions +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 special help exitsts => copy it to NEWMETA +if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED ]; then cp $AMDAINTERNALDIR/HELP_PREDEFINED/* $NEWMETA/help - fi - +fi +# copy all help files if [ ! -d $AMDAINSTALLATION/AMDA_IHM/help/auto ]; then mkdir $AMDAINSTALLATION/AMDA_IHM/help/auto fi - -cp $NEWMETA/help/* $AMDAINSTALLATION/AMDA_IHM/help/auto +cp $NEWMETA/help/* $AMDAINSTALLATION/AMDA_IHM/help/auto if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED/img ]; then if [ ! -d $AMDAINSTALLATION/AMDA_IHM/help/auto/img ]; then @@ -48,21 +56,17 @@ if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED/img ]; then fi # copy info for parameter arguments -if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo ]; then - mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo +if [ -d $NEWMETA/ParamInfo ]; then + if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo ]; then + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo + fi + cp $NEWMETA/ParamInfo/info*.xml $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 +# copy LocalParams.xml created by makeTree.php to AMDA installation +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 +fi +if [ -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ] && [ -e ./LocalParams.xml ]; then mv ./LocalParams.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData - fi \ No newline at end of file +fi \ No newline at end of file -- libgit2 0.21.2