Salome HOME
updated copyright message
[modules/kernel.git] / bin / appliskel / runRemoteSSL.sh
index ff81b9e66c3a2d7cccee36921e88d74fb83c443c..07afbfd62a5a8bf1dc42eb0c84e31bdb55f21255 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-# Copyright (C) 2021  CEA/DEN, EDF R&D
+# Copyright (C) 2021-2023  CEA, EDF
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -32,6 +32,7 @@
 # ssh cli76ce ${APPLI}/runRemoteSSL.sh IOR_OF_CURSTOM_NS SALOME_Container myContainerName
 # --- local arguments
 #     $0 : ${APPLI}/runRemote.sh: from arg name, rebuild and export $APPLI variable
+#     --noenvd : optional argument. If present, the envd file is NOT sourced.
 #     $1 : IOR_OF_CURSTOM_NS of reference to Engines::EmbeddedNamingService servant
 #     $2 : WORKINGDIR (if $2 == WORKINDIR a working dir is given in $3. If not the working dir is $HOME)
 #     $3 : if $2 == WORKINGDIR, the path to the workingdir
@@ -45,10 +46,12 @@ export APPLI=$("${APPLI_HOME}/getAppliPath.py")
 # Sourcing files with parameters works with bash, not with dash. This is why
 # we must use bash for this script.
 
-. "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
-
-# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
-export CUSTOM_NS_IOR=$1
+if [ "$1" == "--noenvd" ]
+then
+  shift
+else
+  . "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
+fi
 
 #go to the requested working directory if any
 if test "x$2" == "xWORKINGDIR"; then
@@ -80,4 +83,4 @@ fi
 
 # --- execute the command in the SALOME environment
 
-"${KERNEL_ROOT_DIR}/bin/salome/envSalome.py" /bin/sh -c "$* $CUSTOM_NS_IOR"
+"${KERNEL_ROOT_DIR}/bin/salome/envSalome.py" /bin/sh -c "$* "