# --- 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
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":