From b317efb4c5b3fd7d8f411422cd724e5cd3259030 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Aguerre?= Date: Wed, 4 Mar 2015 18:13:34 +0100 Subject: [PATCH] install salome auto-completion file --- bin/appli_gen.py | 13 +++++++++---- bin/appliskel/.salome-completion.sh | 2 +- bin/appliskel/CMakeLists.txt | 1 + 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/bin/appli_gen.py b/bin/appli_gen.py index b80ea2c29..ffb36a7f8 100644 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -215,11 +215,17 @@ def install(prefix, config_file, verbose=0): shutil.copyfile(filename, os.path.join(home_dir,"config_appli.xml")) pass + + # Add .salome-completion.sh file + shutil.copyfile(os.path.join(appliskel_dir, ".salome-completion.sh"), + os.path.join(home_dir, ".salome-completion.sh")) + + # Creation of env.d directory virtual_salome.mkdir(os.path.join(home_dir,'env.d')) if _config.has_key("prereq_path") and os.path.isfile(_config["prereq_path"]): - shutil.copyfile(_config["prereq_path"], + shutil.copyfile(_config["prereq_path"], os.path.join(home_dir, 'env.d', 'envProducts.sh')) pass else: @@ -235,11 +241,10 @@ def install(prefix, config_file, verbose=0): pass if _config.has_key("system_conf_path") and os.path.isfile(_config["system_conf_path"]): - shutil.copyfile(_config["system_conf_path"], + shutil.copyfile(_config["system_conf_path"], os.path.join(home_dir, 'env.d', 'envConfSystem.sh')) pass - # Create environment file: configSalome.sh with open(os.path.join(home_dir, 'env.d', 'configSalome.sh'),'w') as f: for module in _config.get("modules", []): @@ -335,7 +340,7 @@ def main(): metavar="", help="XML configuration file (default %(default)s)") - parser.add_argument('-v', '--verbose', action='count', + parser.add_argument('-v', '--verbose', action='count', default=0, help="Increase verbosity") options = parser.parse_args() diff --git a/bin/appliskel/.salome-completion.sh b/bin/appliskel/.salome-completion.sh index 0a54a80c5..273878609 100644 --- a/bin/appliskel/.salome-completion.sh +++ b/bin/appliskel/.salome-completion.sh @@ -74,7 +74,7 @@ _salome() options='-t --terminal -g --gui -d --show-desktop= -o --hide-desktop -b --batch -l --logger -f --log-file= -r --resources= -x --xterm -m --modules= -e --embedded= -s --standalone= -p --portkill -k --killall -i --interp= -z --splash= -c --catch-exceptions= --print-port --nosave-config --pinter --ns-port-log= --test= --play= --gdb-session --ddd-session --valgrind-session -w --shutdown-servers= --foreground= --wake-up-session --server-launch-mode= --port= --siman --siman-study= --siman-scenario= --siman-user= --version -h --help --with-mpi-module=' ;; shell) - options='-h --help -p --port= -m --machine= --with-mpi-module=' + options='-h --help -p --port= -m --machine= -d --directory= -u --user= --with-mpi-module=' ;; esac COMPREPLY=( $( compgen -W "$options" -- "$cur" ) ) diff --git a/bin/appliskel/CMakeLists.txt b/bin/appliskel/CMakeLists.txt index 7bf876b11..11eafbe76 100755 --- a/bin/appliskel/CMakeLists.txt +++ b/bin/appliskel/CMakeLists.txt @@ -37,6 +37,7 @@ SET(SCRIPTS kill_remote_containers.py salome # this is the Python launcher (without .py extension to avoid conflicts when importing salome python package) salome_starter.py + .salome-completion.sh ) SALOME_INSTALL_SCRIPTS("${SCRIPTS}" ${SALOME_INSTALL_SCRIPT_SCRIPTS}/appliskel) -- 2.39.2