From: Jean-Philippe ARGAUD Date: Fri, 5 Apr 2013 07:43:54 +0000 (+0200) Subject: Improving documentation for advanced shell script X-Git-Tag: V7_2_0~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c3c91013a3b3401c5f68e0b57fdcc52cb9ce10e4;p=modules%2Fadao.git Improving documentation for advanced shell script --- diff --git a/doc/advanced.rst b/doc/advanced.rst index b5cc361..010d4f1 100644 --- a/doc/advanced.rst +++ b/doc/advanced.rst @@ -14,11 +14,11 @@ Converting and executing an ADAO command file (JDC) using a shell script ------------------------------------------------------------------------ It is possible to convert and execute an ADAO command file (JDC, or ".comm" -file) automatically by using a template script containing all the required -steps. The user has to know where are the main SALOME scripts, and in particular -the ``runAppli`` one. The directory in which this script resides is symbolically -named ```` and has to be replaced by the good one -in the template. +file, which resides in ````) automatically by using a +template script containing all the required steps. The user has to know where +are the main SALOME scripts, and in particular the ``runAppli`` one. The +directory in which this script resides is symbolically named ```` and has to be replaced by the good one in the template. When an ADAO command file is build by the ADAO GUI editor and saved, if it is named for example "AdaoStudy1.comm", then a companion file named "AdaoStudy1.py" @@ -27,23 +27,26 @@ file>`` in the template, and it is converted to YACS as an ````. After that, it can be executed in console mode using the standard YACS console command (see YACS documentation for more information). -In the example, we choose also to start and stop the SALOME application server -in the same script, which is not necessary, but useful to avoid stalling SALOME -sessions. +In the example, we choose to start and stop the SALOME application server in the +same script, which is not necessary, but useful to avoid stalling SALOME +sessions. We choose also to remove the ```` because it is +a generated one. You only need to replace the text between these symbols +``<...>`` to use it. The template of the shell script is the following:: #!/bin/bash - /runAppli -k -t - /runSession python \ - ${ADAO_ROOT_DIR}/bin/salome/AdaoYacsSchemaCreator.py \ - - /runSession driver \ - - /runSession killSalome.py - -Standard output and errors come on console, successive executions can be done if -the SALOME server is already running. + export USERDIR= + export SALOMEDIR= + $SALOMEDIR/runAppli -k -t + $SALOMEDIR/runSession python \ + $SALOMEDIR/bin/salome/AdaoYacsSchemaCreator.py \ + $USERDIR/ $USERDIR/ + $SALOMEDIR/runSession driver $USERDIR/ + $SALOMEDIR/runSession killSalome.py + rm -f $USERDIR/ADAO_Case.xml + +Standard output and errors come on console. Running an ADAO calculation scheme in YACS using a TUI user mode ----------------------------------------------------------------