From 327aebf9a8a3150fe7174553b19c5c6b206b2109 Mon Sep 17 00:00:00 2001 From: caremoli Date: Sat, 2 Oct 2010 15:48:02 +0000 Subject: [PATCH] CCAR: add a way in envSalome.py (-exec tag) to use options only for execution (needed by runSession) --- bin/appliskel/runSession | 2 +- bin/envSalome.py | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/bin/appliskel/runSession b/bin/appliskel/runSession index 885a7e5c8..2f792b3f2 100755 --- a/bin/appliskel/runSession +++ b/bin/appliskel/runSession @@ -114,7 +114,7 @@ fi # --- invoke shell with or without args if [ $# -ne 0 ] ; then - ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py $* + ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py -exec $* else ${KERNEL_ROOT_DIR}/bin/salome/envSalome.py /bin/bash --rcfile ${HOME}/${APPLI}/.bashrc diff --git a/bin/envSalome.py b/bin/envSalome.py index 4ef0b8aaa..d4fb61bd7 100755 --- a/bin/envSalome.py +++ b/bin/envSalome.py @@ -29,19 +29,14 @@ import setenv kernel_root=os.getenv("KERNEL_ROOT_DIR") sys.path[:0]=[kernel_root+"/bin/salome"] -#import runSalome - argv = sys.argv[1:] sys.argv = argv[1:] -#sys.argv = [sys.argv[0]] -#if len(argv) > 3: -# sys.argv += argv[3:] -#if len(argv) > 2: -# sys.argv = argv[2:] - -#args, modules_list, modules_root_dir = setenv.get_config() -#runSalome.set_env(args, modules_list, modules_root_dir) +if argv[0] == "-exec": + #keep options only for execution + del argv[0] + sys.argv = [] + setenv.main(True); if sys.platform == "win32": -- 2.39.2