]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
sh <--> bash
authorrahuel <rahuel@opencascade.com>
Thu, 9 Feb 2006 15:04:16 +0000 (15:04 +0000)
committerrahuel <rahuel@opencascade.com>
Thu, 9 Feb 2006 15:04:16 +0000 (15:04 +0000)
export syntax

bin/appliskel/killCurrentPort
bin/appliskel/runAppli
bin/appliskel/runConsole
bin/appliskel/runParam
bin/appliskel/runRemote.sh
bin/appliskel/runSession
bin/appliskel/runTests
bin/appliskel/searchFreePort.sh
bin/appliskel/setAppliPath.sh

index bca506068665d28b5d2063c0d9475c9579d85816..cfb87da7810f852668e91e2221227cb50591d6c8 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
 
@@ -14,7 +14,8 @@ myhost=`hostname`
 fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
 
 if [ -f $fileOmniConfig ]; then
-  export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+  OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+  export OMNIORB_CONFIG
 fi
 
 currentPort=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
index 1d86ad3d596273903687f570c706a0a420a8bf37..7146b6b82439d3fbff052b27e50076a30e9dd41a 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
 
index caeabbdd61319e13363aaad5944a21d032d5e8a9..1756189ff95eac46f0e4b49b19b4b6d8deb91fc9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
 
index c858c670fcdea8da2a0c25c67fddc14dfae8a714..68e5a25c0612f9816755e8a38909ec68da996eb3 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 ./KillCurrentPort
 
index 594616a0709701485a25059c812642b114070f51..3ab5a1daf81fb0979802f97056f9bea8d73b04b2 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # --- run command in SALOME environment from remote call, ssh or rsh
 #     - SALOME configuration is defined by :
 
 # --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
 
-export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg
-export NSHOST=$1
-export NSPORT=$2
+OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_$1_$2.cfg
+export OMNIORB_CONFIG
+NSHOST=$1
+export NSHOST
+NSPORT=$2
+export NSPORT
 initref="NameService=corbaname::"$1":$2"
 echo "ORBInitRef $initref" > $OMNIORB_CONFIG
 
@@ -41,4 +44,4 @@ echo "ORBInitRef $initref" > $OMNIORB_CONFIG
 
 shift 2
 
-${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile $HOME/$APPLI/.bashrc -c "$*"
+${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile $HOME/$APPLI/.bashrc -c "$*"
index 22d3fdd0fb3307419a4e8f9ff1e3ef810454d9f0..1f99cce7bc74406b78178ccb00cc9223b07ffaa6 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Useful shell to run executable progs or shells under Salome env
 # Use it with args to run a program : runSession python -i myprog.py
@@ -19,19 +19,22 @@ myhost=`hostname`
 fileOmniConfig=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
 
 if [ -f $fileOmniConfig ]; then
-  export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+  OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+  export OMNIORB_CONFIG
 
   # --- set environment variables for port and hostname of NamingService
 
-  export NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
-  export NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
+  NSHOST=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py host`
+  export NSHOST
+  NSPORT=`${KERNEL_ROOT_DIR}/bin/salome/NSparam.py port`
+  export NSPORT
 fi
 
 # --- invoque shell with or without args
 
 if [ $# -ne 0 ] ; then
-    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
 else
 
-    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc
 fi
index 755825d797a7588da6480fdbdbaa56faaec88d91..4ff2bc186ac254a1110a01e36aa2ea8cc31a19d1 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
 
@@ -21,13 +21,16 @@ searchFreePort() {
         if [ -z "$aRes" ]; then
             echo ${NSPORT} - Ok
            local myhost=`hostname`
-            export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+            OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+            export OMNIORB_CONFIG
            export NSPORT
-            export NSHOST=${myhost}
+            NSHOST=${myhost}
+            export NSHOST
             local initref="NameService=corbaname::"`hostname`":$NSPORT"
             #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
             echo "InitRef = $initref" > $OMNIORB_CONFIG
-            export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
+            LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_test.cfg
+            export LAST_RUNNING_CONFIG
            rm ${LAST_RUNNING_CONFIG}
             ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
             break
@@ -55,10 +58,10 @@ fi
 searchFreePort
 
 if [ $# -ne 0 ] ; then
-    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc -c "$*"
 else
 
-    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc
+    ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/sh --rcfile ${HOME}/${APPLI}/.bashrc
 fi
 
 rm ${OMNIORB_CONFIG}
index 8108a93dcb542cfbfda619145807e065d289d56e..7333b1ce7288bdc4ef3163638507ef70ebae7ba1 100755 (executable)
@@ -1,10 +1,11 @@
-#!/bin/bash
+#!/bin/sh
 
 # --- define port for CORBA naming service
 
 searchFreePort() {
     echo -n "Searching for a free port for naming service: "
-    export NSPORT=2810
+    NSPORT=2810
+    export NSPORT
     local limit=$NSPORT
     let limit=limit+100
     while [ 1 ]
@@ -13,13 +14,16 @@ searchFreePort() {
         if [ -z "$aRes" ]; then
             echo ${NSPORT} - Ok
            local myhost=`hostname`
-            export OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+            OMNIORB_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_${NSPORT}.cfg
+            export OMNIORB_CONFIG
            export NSPORT
-            export NSHOST=${myhost}
+            NSHOST=${myhost}
+            export NSHOST
             local initref="NameService=corbaname::"`hostname`":$NSPORT"
             #echo "ORBInitRef $initref" > $OMNIORB_CONFIG
             echo "InitRef = $initref" > $OMNIORB_CONFIG
-            export LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+            LAST_RUNNING_CONFIG=${HOME}/${APPLI}/.omniORB_${myhost}_last.cfg
+            export LAST_RUNNING_CONFIG
            rm ${LAST_RUNNING_CONFIG}
             ln -s ${OMNIORB_CONFIG} ${LAST_RUNNING_CONFIG}
             break
index d9361ae526f8e48649ebe958af9ed80eb77aab2c..99078065a7388689c2fc51183d32698ae04b356f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 # --- retrieve APPLI path, relative to $HOME, set ${APPLI}
 #     on sarge, "which" gives not allways the absolute path...