#!/bin/bash
-# Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+# Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
#
# Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
# CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
# ssh cli76ce ${APPLI}/runRemote.sh cli76cd 2810 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 : computer name for CORBA name service (where SALOME was launched)
# $2 : port for CORBA name service
# $3 : WORKINGDIR (if $3 == WORKINDIR a working dir is given in $4. If not the working dir is $HOME)
# $4 : if $3 == WORKINGDIR, the path to the workingdir
# $5 (or $3 if no workingdir given) and following : local command to execute, with args
+
# --- retrieve APPLI path, relative to $HOME, set ${APPLI}
APPLI_HOME=$(dirname "$0")
# 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}"
+if [ "$1" == "--noenvd" ]
+then
+ shift
+else
+ . "${HOME}/${APPLI}/envd" "${HOME}/${APPLI}"
+fi
# --- set the OMNIORB_CONFIG file and environment relative to this run of SALOME
export NSHOST=$1