From e08dae70057e5525014a4a0a3962f3a8fe128c33 Mon Sep 17 00:00:00 2001 From: Gilles DAVID Date: Fri, 17 Mar 2023 15:50:18 +0100 Subject: [PATCH] Fix commit 1d03556: salome scripts must be copied, not add as symlinks --- bin/appli_gen.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/bin/appli_gen.py b/bin/appli_gen.py index 269573403..f6345e339 100755 --- a/bin/appli_gen.py +++ b/bin/appli_gen.py @@ -283,9 +283,6 @@ def install(prefix, config_file, verbose=0): 'runRemote.sh', 'runRemoteSSL.sh', '.salome_run', - 'salome', - 'salome_mesa', - 'salome_common.py', 'update_catalogs.py', '.bashrc', ): @@ -313,6 +310,19 @@ def install(prefix, config_file, verbose=0): fd.write('#!/bin/bash\n') fd.write('module load %s\n' % (' '.join(env_modules))) + # Copy salome / salome_mesa scripts: + + for scripts in ('salome', 'salome_mesa', 'salome_common.py'): + salome_script = open(os.path.join(appliskel_dir, scripts)).read() + salome_file = os.path.join(home_dir, scripts) + try: + os.remove(salome_file) + except Exception: + pass + with open(salome_file, 'w') as fd: + fd.write(salome_script.replace('MODULES = []', 'MODULES = {}'.format(env_modules))) + os.chmod(salome_file, 0o755) + # Add .salome-completion.sh file shutil.copyfile(os.path.join(appliskel_dir, ".salome-completion.sh"), os.path.join(home_dir, ".salome-completion.sh")) -- 2.39.2