Commit 4c77b9b1e4ad0a069364c23e8b8a4b63ef6a9c77

Authored by Elena.Budnik
1 parent 45a46271

final update

update_amda/amda_clean_newmeta 0 → 100755
... ... @@ -0,0 +1,7 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +
  5 + ./updateAmda -c
  6 +
  7 +
... ...
update_amda/amda_generate_args 0 → 100755
... ... @@ -0,0 +1,5 @@
  1 +#!/bin/bash
  2 +
  3 +# Generate AMDA parameters args
  4 +
  5 + ./updateAmda -a
... ...
update_amda/amda_install_all 0 → 100755
... ... @@ -0,0 +1,12 @@
  1 +#!/bin/bash
  2 +
  3 +# Complete AMDA Installation
  4 +# if argv[1] is set - update SPASE Registry as well
  5 +
  6 + if [ $# -eq 0 ]
  7 + then
  8 + ./updateAmda -i -a -r
  9 + else
  10 + ./updateAmda -i -a -r -s
  11 + fi
  12 +
... ...
update_amda/amda_install_internal 0 → 100755
... ... @@ -0,0 +1,11 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +
  5 + if [ $# -eq 0 ]
  6 + then
  7 + ./updateAmda -i
  8 + else
  9 + ./updateAmda -i -s
  10 + fi
  11 +
... ...
update_amda/amda_install_internal_with-args 0 → 100755
... ... @@ -0,0 +1,11 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +
  5 + if [ $# -eq 0 ]
  6 + then
  7 + ./updateAmda -i -a
  8 + else
  9 + ./updateAmda -i -a -s
  10 + fi
  11 +
... ...
update_amda/amda_install_remote 0 → 100755
... ... @@ -0,0 +1,7 @@
  1 +#!/bin/bash
  2 +
  3 +# Remote DataBases Installation/Updating
  4 +
  5 + ./updateAmda -r
  6 +
  7 +
... ...
update_amda/amda_update 0 → 100755
... ... @@ -0,0 +1,11 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +
  5 + if [ $# -eq 0 ]
  6 + then
  7 + ./updateAmda -u
  8 + else
  9 + ./updateAmda -u -s
  10 + fi
  11 +
... ...
update_amda/amda_update_args 0 → 100755
... ... @@ -0,0 +1,5 @@
  1 +#!/bin/bash
  2 +
  3 +# update AMDA parameters args : only non existing in NEWMETA/ParamInfo
  4 +
  5 + ./updateAmda -p
... ...
update_amda/amda_update_with-remote 0 → 100755
... ... @@ -0,0 +1,11 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +
  5 + if [ $# -eq 0 ]
  6 + then
  7 + ./updateAmda -u -r
  8 + else
  9 + ./updateAmda -u -r -s
  10 + fi
  11 +
... ...
update_amda/cleanExistingInstallation 0 → 100755
... ... @@ -0,0 +1,33 @@
  1 +#!/bin/bash
  2 +
  3 +if test $AMDAINSTALLATION/AMDA_IHM/generic_data
  4 +then
  5 + rm $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo/*.xml
  6 + rm $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate/*.xml
  7 + rm $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase/*.xml
  8 +else
  9 + echo "check if AMDA_IHM/generic_data directory exists"
  10 +fi
  11 +
  12 +if test $AMDAINSTALLATION/AMDA_IHM/generic_data/help/auto
  13 +then
  14 + rm $AMDAINSTALLATION/AMDA_IHM/help/auto/*
  15 + rm $AMDAINSTALLATION/AMDA_IHM/help/auto/img/*
  16 +fi
  17 +
  18 +if test $AMDAINSTALLATION/AMDA_Kernel/config
  19 +then
  20 + rm $AMDAINSTALLATION/AMDA_Kernel/config/DataSetInfo/*.xml
  21 + rm $AMDAINSTALLATION/AMDA_Kernel/config/InstrumentInfo/*.xml
  22 + rm $AMDAINSTALLATION/AMDA_Kernel/config/MissionInfo/*.xml
  23 +else
  24 + "check if AMDA_Kernel/config directory exists"
  25 +fi
  26 +
  27 +if test $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo
  28 +then
  29 + rm -r $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo/src/*
  30 + rm $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo/lib/*
  31 +else
  32 + "check if AMDA_Kernel/app-generate-paraminfo directory exists"
  33 +fi
0 34 \ No newline at end of file
... ...
update_amda/cleanNewMetaLight 0 → 100755
... ... @@ -0,0 +1,14 @@
  1 +#!/bin/bash
  2 +
  3 +if test $NEWMETA
  4 +then
  5 +
  6 + for Dir in $(find -L $NEWMETA/* -type d -not -path *ParamInfo* )
  7 + do
  8 + rm ${Dir}/*
  9 + done
  10 +
  11 + rm $AMDA_SPASE_INTERFACE/SPASE/*
  12 +else
  13 + echo "NEWMETA env var is not defined - source env.sh"
  14 +fi
... ...
update_amda/cleanNewMetaParamInfo 0 → 100755
... ... @@ -0,0 +1,12 @@
  1 +#!/bin/bash
  2 +
  3 +if test $NEWMETA
  4 +then
  5 + for Dir in $(find -L $NEWMETA/ParamInfo -type d)
  6 + do
  7 + rm ${Dir}/*
  8 + done
  9 +
  10 +else
  11 + echo "NEWMETA env var is not defined - source env.sh"
  12 +fi
... ...
update_amda/cp2amda 0 → 100755
... ... @@ -0,0 +1,67 @@
  1 +#!/bin/bash
  2 +
  3 +cp $NEWMETA/datasets/*.xml $AMDAINSTALLATION/AMDA_Kernel/config/DataSetInfo
  4 +cp $NEWMETA/instruments/*.xml $AMDAINSTALLATION/AMDA_Kernel/config/InstrumentInfo
  5 +cp $NEWMETA/missions/*.xml $AMDAINSTALLATION/AMDA_Kernel/config/MissionInfo
  6 +
  7 +
  8 +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate ]; then
  9 + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate
  10 +fi
  11 +
  12 +if [ -e $AMDAINTERNALDIR/ParamTemplateList.xml ]; then
  13 + php $AMDA_SPASE_INTERFACE/mvTemplates.php
  14 + cp $AMDAINTERNALDIR/ParamTemplateList.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate
  15 + fi
  16 +
  17 + if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase ]; then
  18 + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase
  19 + fi
  20 +
  21 + cp $NEWMETA/final/*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase
  22 +
  23 + # if internal parameters not shown in the tree exist => copy them
  24 + if [ -d $AMDAINTERNALDIR/INTERNAL_PARAM_DEF ]
  25 + then
  26 + cp $AMDAINTERNALDIR/INTERNAL_PARAM_DEF/* $AMDAINSTALLATION/AMDA_IHM/generic_data/newKernelDDBase
  27 + fi
  28 +
  29 +# if special help exitsts => copy it
  30 +if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED ]
  31 + then
  32 + cp $AMDAINTERNALDIR/HELP_PREDEFINED/* $NEWMETA/help
  33 + fi
  34 +
  35 +
  36 +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/help/auto ]; then
  37 + mkdir $AMDAINSTALLATION/AMDA_IHM/help/auto
  38 +fi
  39 +
  40 +cp $NEWMETA/help/* $AMDAINSTALLATION/AMDA_IHM/help/auto
  41 +
  42 +if [ -d $AMDAINTERNALDIR/HELP_PREDEFINED/img ]; then
  43 + if [ ! -d $AMDAINSTALLATION/AMDA_IHM/help/auto/img ]; then
  44 + mkdir $AMDAINSTALLATION/AMDA_IHM/help/auto/img
  45 + fi
  46 + cp $AMDAINTERNALDIR/HELP_PREDEFINED/img/* $AMDAINSTALLATION/AMDA_IHM/help/auto/img
  47 +fi
  48 +
  49 +# copy info for parameter arguments
  50 +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo ]; then
  51 + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo
  52 +fi
  53 +
  54 +if [ -d $NEWMETA/ParamInfo ]
  55 + then
  56 + cp $NEWMETA/ParamInfo/info*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo
  57 + fi
  58 +
  59 +if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ]
  60 + then
  61 + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData
  62 + fi
  63 +
  64 +if [ -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ] && [ -e ./LocalParams.xml ]
  65 + then
  66 + mv ./LocalParams.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData
  67 + fi
0 68 \ No newline at end of file
... ...
update_amda/generate_param_info 0 → 100755
... ... @@ -0,0 +1,80 @@
  1 +#!/bin/bash
  2 +
  3 +if [[ -z ${NEWMETA+x} || -z ${AMDAINSTALLATION+x} ]]; then
  4 + echo "check if NEWMETA & AMDAINSTALLATION env variables are defined"
  5 + exit
  6 +fi
  7 +
  8 +CRT_PWD=`pwd`
  9 +
  10 +cd $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo
  11 +
  12 +export PATH=$AMDAINSTALLATION/AMDA_Kernel/build/${BUILD_TYPE}/bin:$PATH
  13 +export DDPATH=$AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo
  14 +
  15 +PARAM_INFO_PATH=$NEWMETA/ParamInfo
  16 +if [ ! -d "$PARAM_INFO_PATH" ]; then
  17 + mkdir "$PARAM_INFO_PATH"
  18 +fi
  19 +
  20 +# if predefined param info exists - copy it to NEWMETA/ParamInfo
  21 +# to avoid not needed calculations
  22 +
  23 +if [ -d $AMDAINTERNALDIR/PARAM_INFO_PREDEFINED ]; then
  24 + cp $AMDAINTERNALDIR/PARAM_INFO_PREDEFINED/info*.xml $NEWMETA/ParamInfo
  25 +fi
  26 +
  27 +#modif in app.properties
  28 +if [ ! -e ./app.properties ]; then
  29 + echo "No app.properties file !!!"
  30 + exit
  31 +fi
  32 +
  33 +if [ -e ./app.properties.temp ]; then
  34 + # rm ./app.properties.temp
  35 + echo "Seems ./app.properties has been modified already"
  36 +else
  37 + while read line
  38 + do
  39 +
  40 + if [[ $line == app.param.path* ]]; then
  41 + line="app.param.path="$NEWMETA"final/"
  42 + fi
  43 +
  44 + if [[ $line == app.dataSetInfo.path* ]]; then
  45 + line="app.dataSetInfo.path="$NEWMETA"datasets/"
  46 + fi
  47 +
  48 + if [[ $line == app.user.name* ]]; then
  49 + line="app.user.name="$DDUSER
  50 + fi
  51 +
  52 + echo $line >> ./app.properties.temp
  53 +
  54 + done < <(cat $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo/app.properties)
  55 +
  56 + cp ./app.properties.temp $AMDAINSTALLATION/AMDA_Kernel/app-generate-paraminfo/app.properties
  57 +fi
  58 +
  59 +
  60 +DDLogin $DDUSER $DDPASS
  61 +
  62 +for param_file in $NEWMETA/final/*.xml
  63 +do
  64 + param_filename=$(basename "${param_file%.*}")
  65 + info_file=info_${param_filename}.xml
  66 +
  67 + if [ -e $NEWMETA/ParamInfo/$info_file ]
  68 + then
  69 + echo ${param_filename} exists
  70 + else
  71 + echo "Generate info file for ${param_filename}"
  72 + amdaParameterInfo -p ${param_filename}
  73 + if [ $? -eq 0 ]; then
  74 + mv $info_file $NEWMETA/ParamInfo
  75 + fi
  76 + fi
  77 +done;
  78 +
  79 +
  80 +cd ${CRT_PWD}
... ...
update_amda/makeOrbits 0 → 100755
... ... @@ -0,0 +1,10 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +#
  5 +#
  6 +
  7 + if [ -z ${AMDA_IHM+x} ]; then export AMDA_IHM=./..; fi
  8 +
  9 + php $AMDA_IHM/php/makeOrbitsList.php
  10 + php $AMDA_IHM/php/makeOrbitsInKm.php
0 11 \ No newline at end of file
... ...
update_amda/makeRemote 0 → 100755
... ... @@ -0,0 +1,22 @@
  1 +#!/bin/bash
  2 +
  3 +#
  4 +#
  5 +#
  6 + if [ -z ${AMDA_IHM+x} ]; then export AMDA_IHM=./..; fi
  7 +
  8 + # check if Orbites.xml exists; if not create it !
  9 + if [ ! -e $AMDA_IHM/generic_data/LocalData/OrbitsAll.xml ]; then
  10 + php $AMDA_IHM/php/makeOrbitsList.php
  11 + php $AMDA_IHM/php/makeOrbitsInKm.php
  12 + fi
  13 +
  14 + # make Proxies for 'isSimulation' dataCenters from Bases.xml
  15 + php $AMDA_IHM/php/RemoteDataCenter/makeProxy.php
  16 +
  17 + # make [TARGET].json
  18 + php $AMDA_IHM/php/RemoteDataCenter/makeOrbitsArgs.php
  19 +
  20 + # make template args
  21 + php $AMDA_IHM/php/RemoteDataCenter/makeArgs.php
  22 +
0 23 \ No newline at end of file
... ...
update_amda/makeTree.php 0 → 100644
... ... @@ -0,0 +1,105 @@
  1 +<?php
  2 +
  3 + /*
  4 + * make local data tree from list of missions
  5 + */
  6 +
  7 + define("AMDA_SPASE_INTERFACE", getenv("AMDA_SPASE_INTERFACE"));
  8 +
  9 + if ( AMDA_SPASE_INTERFACE == "" )
  10 + require_once("./config.php");
  11 + else
  12 + require_once(AMDA_SPASE_INTERFACE."/config.php");
  13 +
  14 + $AMDAINSTALLATION = getenv("AMDAINSTALLATION");
  15 +
  16 + define("DATAPATH", "$AMDAINSTALLATION/AMDA_IHM/generic_data/");
  17 +
  18 + if (file_exists(DATAPATH.'rank.json'))
  19 + $cmpArr = json_decode(file_get_contents(DATAPATH.'rank.json'), true);
  20 + else
  21 + $cmpArr = null;
  22 +
  23 + $ddMission = new DomDocument("1.0");
  24 +
  25 + $localDom = new DomDocument("1.0");
  26 + $localDom->formatOutput = true;
  27 +
  28 + $BASE = $localDom->createElement('dataRoot');
  29 + $BASE->setAttribute('xml:id', 'DATAROOT');
  30 + $Amda = $localDom->createElement('dataCenter');
  31 + $Amda->setAttribute('name', 'AMDA');
  32 + $Amda->setAttribute('desc', 'AMDA_Internal_Data_Base');
  33 + $Amda->setAttribute('xml:id', 'myLocalData-treeRootNode');
  34 +
  35 + foreach ( glob(AMDATREEDIR.'DD_*.xml') as $xml )
  36 + {
  37 + $ddMission->load($xml);
  38 + $missions = $ddMission->getElementsByTagName("mission");
  39 + foreach ($missions as $mission)
  40 + {
  41 + if ($mission->getAttribute('xml:id') == '') continue;
  42 + $nodeNew = $localDom->importNode($mission,true);
  43 +
  44 + if (is_array($cmpArr))
  45 + {
  46 + $targetMis = $mission->getAttribute('target');
  47 + $index = $cmpArr[$targetMis];
  48 + if ($index)
  49 + $nodeNew->setAttribute('rank',$index);
  50 + else $nodeNew->setAttribute('rank', 999);
  51 +
  52 + $observatories = $nodeNew->getElementsByTagName('observatory');
  53 + if ($observatories->length > 0)
  54 + {
  55 + foreach ($observatories as $obs)
  56 + {
  57 + if ($obs->hasAttribute('target'))
  58 + {
  59 + $target = $obs->getAttribute('target');
  60 + $index = $cmpArr[$target];
  61 + if ($index && $target != $targetMis)
  62 + $obs->setAttribute('rank',$index);
  63 + }
  64 + }
  65 + }
  66 + }
  67 + //TODO set propre restriction
  68 +// $available = $nodeNew->hasAttribute('restriction');
  69 +// $nodeNew->setAttribute('available', !$available);
  70 + $Amda->appendChild($nodeNew);
  71 + }
  72 + }
  73 +
  74 + if ($Amda->hasChildNodes()) $BASE->appendChild($Amda);
  75 + $localDom->appendChild($BASE);
  76 +
  77 + // check ID duplication
  78 + $allIds = array();
  79 + foreach($localDom->getElementsByTagName('*') as $element)
  80 + {
  81 + $allIds[] = $element->getAttribute('xml:id');
  82 + }
  83 + $arr = array_count_values($allIds);
  84 +
  85 + print_r('DUPLICATED IDs : '.PHP_EOL);
  86 + foreach ($arr as $key => $value)
  87 + if ($value > 1) print_r($key.'=>'.$value.PHP_EOL);
  88 +
  89 + // set 'TBD' attribute - if the parameter is not checked yet
  90 + if (is_dir(TBD))
  91 + {
  92 + $params = $localDom->getElementsByTagName('parameter');
  93 + $nToCheck = 0;
  94 + foreach ($params as $param) {
  95 + $id = $param->getAttribute("xml:id");
  96 + if (file_exists(TBD."$id.xml")) {
  97 + $param->setAttribute('tbd', true);
  98 + $nToCheck ++;
  99 + }
  100 + }
  101 + echo "TOCHECK ".$nToCheck.PHP_EOL;
  102 + }
  103 +
  104 + $localDom->save('LocalParams.xml');
  105 +?>
... ...
update_amda/mvTemplates.php 0 → 100644
... ... @@ -0,0 +1,34 @@
  1 +<?php
  2 +
  3 + $NEWMETA = getenv('NEWMETA');
  4 + $AMDAINSTALLATION = getenv('AMDAINSTALLATION');
  5 + $AMDAINTERNALDIR = getenv('AMDAINTERNALDIR');
  6 +
  7 + $templateXml = new DomDocument("1.0");
  8 + $templateXml->load($AMDAINTERNALDIR."/ParamTemplateList.xml");
  9 + $paramTemplates = $templateXml->getElementsByTagName('paramTemplate');
  10 +
  11 + if (!is_dir("$AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate"))
  12 + mkdir("$AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate");
  13 +
  14 + foreach ($paramTemplates as $template) {
  15 + $paramId = $template->getAttribute('paramId');
  16 + $fileName = $template->getAttribute('fileName');
  17 + // for spase-list params
  18 + if (file_exists("$NEWMETA/final/$paramId.xml")) {
  19 + echo "Template ".$paramId.PHP_EOL;
  20 + $from = "$NEWMETA/final/$paramId.xml";
  21 + $to = "$AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate/$fileName.xml";
  22 +
  23 + copy($from, $to);
  24 + unlink("$NEWMETA/final/$paramId.xml");
  25 + }
  26 + // for internal params
  27 + if (file_exists("$AMDAINTERNALDIR/INTERNAL_PARAM_DEF/$paramId.xml")) {
  28 + echo "Template ".$paramId.PHP_EOL;
  29 + $from = "$AMDAINTERNALDIR/INTERNAL_PARAM_DEF/$paramId.xml";
  30 + $to = "$AMDAINSTALLATION/AMDA_IHM/generic_data/ParamTemplate/$fileName.xml";
  31 + copy($from,$to);
  32 + }
  33 + }
  34 +?>
0 35 \ No newline at end of file
... ...
update_amda/updateAmda 0 → 100755
... ... @@ -0,0 +1,154 @@
  1 +#!/bin/bash
  2 +
  3 +# --install | -i ; --update-internal | -u ; --with-remote | -r ; --generate-param-args | -a ; -update-param-args | -p ;
  4 +# --spase-synchro | -s ; --clean-new-meta | -c ; --help | -h;
  5 +
  6 +. ./updateEnv.sh
  7 +
  8 + for option in $@
  9 + do
  10 + case $option in
  11 + --install | -i) INSTALL=1
  12 + ;;
  13 + --update-internal | -u) UPDATE=1
  14 + ;;
  15 + --with-remote | -r) REMOTE=1
  16 + ;;
  17 + --generate-param-args | -a) PARAM_INFO=1
  18 + CLEAN_ARGS=1
  19 + ;;
  20 + --update-param-args | -p) PARAM_INFO=1
  21 + ;;
  22 + --spase-synchro | -s) SYNCHRO=1
  23 + ;;
  24 + --clean-new-meta | -c) CLEAN_NEWMETA=1
  25 + ;;
  26 + --help | -h) echo "updateAmda --install | -i ; --update-internal | -u ; --with-remote | -r ; --generate-param-args | -a ; -update-param-args | -p ; --spase-synchro | -s ; --clean-new-meta | -c ; --help | -h;"
  27 + exit
  28 + ;;
  29 + *) echo "Invalid option" $option
  30 + exit
  31 + ;;
  32 + esac
  33 + done
  34 +
  35 + #Please export DDUSER and DDPASS in the shell !!!!
  36 + if [ $PARAM_INFO ] && [[ -z ${DDUSER+x} || -z ${DDPASS+x} ]]
  37 + then
  38 + echo "Warning : DDUSER and DDPASS should be defined to generate params info"
  39 + echo "No params info generation will be done!!!"
  40 + unset PARAM_INFO
  41 + #export DDUSER=XXXX
  42 + #export DDPASS=XXXX
  43 + fi
  44 +
  45 + # In the case of SPASE synchro export SPASEUSER
  46 + if [ -z ${SPASEUSER+x} ] && [ $SYNCHRO ]
  47 + then
  48 + echo "SPASEUSER should be defined to SYNCHRO SPASE Registry"
  49 + echo "No SYNHRO wil be done!!!"
  50 + #export SPASEUSER=XXXX
  51 + unset SYNCHRO
  52 + fi
  53 +
  54 + if [ $CLEAN_NEWMETA ]
  55 + then
  56 + echo "cleaning in NEWMETA.."
  57 + # cleanNewMetaLight
  58 + cleanNewMetaLight
  59 + cleanNewMetaParamInfo
  60 + echo "clean in NEWMETA : done"
  61 + exit
  62 + fi
  63 +
  64 + if [ $INSTALL ]
  65 + then
  66 + echo "Installing...."
  67 +
  68 + echo "cleaning in NEWMETA.."
  69 + cleanNewMetaLight
  70 + echo "clean in NEWMETA : done"
  71 +
  72 + echo "cleaning in AMDA_IHM/generic_data AMDA_Kernel/config..."
  73 + cleanExistingInstallation
  74 + echo "clean in AMDA_IHM/generic_data AMDA_Kernel/config : done"
  75 +
  76 + echo "making Amda From Spase..."
  77 + if [ $SYNCHRO ]
  78 + then
  79 + php $AMDA_SPASE_INTERFACE/makeAmdaFromSpase.php "synchro"
  80 + else
  81 + php $AMDA_SPASE_INTERFACE/makeAmdaFromSpase.php
  82 + fi
  83 + echo "make Amda From Spase : done"
  84 +
  85 + echo "making Tree..."
  86 + php makeTree.php
  87 + echo "make Tree : done"
  88 +
  89 + echo "copying 2 amda..."
  90 + ./cp2amda
  91 + echo "copy 2 amda : done"
  92 +
  93 + echo "making Orbits..."
  94 + ./makeOrbits
  95 + echo "make Orbits : done"
  96 + fi
  97 + # Update StartStop only
  98 + if [ $UPDATE ]
  99 + then
  100 + echo "Updating...."
  101 +
  102 + if [ $SYNCHRO ]
  103 + then
  104 + php $AMDA_SPASE_INTERFACE/updateStartStop.php 'synchro'
  105 + else
  106 + php $AMDA_SPASE_INTERFACE/updateStartStop.php
  107 + fi
  108 +
  109 + echo 'update in NEWMETA/dd_missions: done'
  110 +
  111 + echo "making Tree..."
  112 + php makeTree.php
  113 + echo "make Tree : done"
  114 +
  115 + if [ -d $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData ] && [ -e ./LocalParams.xml ]
  116 + then
  117 + mv ./LocalParams.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/LocalData
  118 + fi
  119 + echo 'copy 2 amda : done'
  120 +
  121 + echo "updating OrbitsInfo..."
  122 + php $AMDAINSTALLATION/AMDA_IHM/php/RemoteDataCenter/makeOrbitsInfo.php
  123 + echo "update OrbitsInfo : done"
  124 + fi
  125 +
  126 + if [ $PARAM_INFO ]
  127 + then
  128 + echo "Generating param info...."
  129 +
  130 + if [ $CLEAN_ARGS ]; then
  131 + cleanNewMetaParamInfo
  132 + fi
  133 +
  134 + generate_param_info
  135 + # copy info for parameter arguments
  136 + if [ ! -d $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo ]; then
  137 + mkdir $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo
  138 + fi
  139 +
  140 + if [ -d $NEWMETA/ParamInfo ]
  141 + then
  142 + cp $NEWMETA/ParamInfo/info*.xml $AMDAINSTALLATION/AMDA_IHM/generic_data/ParamInfo
  143 + fi
  144 +
  145 + echo "generate info for arguments : done"
  146 + fi
  147 +
  148 + if [ $REMOTE ]
  149 + then
  150 + echo "making Remote"
  151 + ./makeRemote
  152 + echo "make Remote : done"
  153 + fi
  154 +
0 155 \ No newline at end of file
... ...
update_amda/updateEnv.sh 0 → 100644
... ... @@ -0,0 +1,32 @@
  1 +#!/bin/bash
  2 +
  3 + export AMDA_SPASE_INTERFACE=/home/budnik/AMDA_SPASE_INTERFACE/
  4 + # info dirs will be written here
  5 + export NEWMETA=/home/budnik/NEWMETA/
  6 + # AMDA internal parameter XMLs
  7 + export AMDAINTERNALDIR=/home/budnik/AMDA_INTERNAL_METADATA/
  8 + # AMDA Installation
  9 + export AMDAINSTALLATION=/home/budnik/AMDA
  10 + # DD Installation
  11 + export DDROOT=/opt/local
  12 + # GCC Installation
  13 + export GCCROOT=/opt/tools/gcc/4.7.2/rtf
  14 + #AMDA_Kernel build type to use for paraminfo generation
  15 + export BUILD_TYPE=Debug
  16 +
  17 + export AMDA_IHM=$AMDAINSTALLATION/AMDA_IHM
  18 + export LD_LIBRARY_PATH=$GCCROOT/lib64:$GCCROOT/lib:$DDROOT/lib
  19 + export PATH=./:$GCCROOT/bin:$DDROOT/bin:$AMDA_IHM/update_amda:$AMDA_SPASE_INTERFACE:$AMDA_IHM/php:$PATH
  20 +
  21 + # DD Server WebServices (to update Start-Stop)
  22 + export DD_WSDL="http://amda-dev.irap.omp.eu/BASE/DDService/dd.wsdl"
  23 +
  24 + #SPASE Registry definitions
  25 + export SPASE_REPO="http://apus.irap.omp.eu:8080/amda-registry/resolver"
  26 + #Remote SPASE Registry to get Person' Info
  27 + export SPASE_REMOTE="http://www.spase-group.org/smwg/resolver"
  28 + # for SPASE Registy MAJ
  29 + export SPASE_HOST=apus.irap.omp.eu
  30 + export SPASE_ROOT="/usr/share/tomcat/webapps/amda-registry/metadata"
  31 +
  32 +
... ...