From 91c766426b55be64a75ac3db2fa13a472e0e36ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2025 13:21:55 +0200 Subject: [PATCH 1/6] add test comment --- init/modules/EESSI/2023.06.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init/modules/EESSI/2023.06.lua b/init/modules/EESSI/2023.06.lua index 0d82090b..761e36c2 100644 --- a/init/modules/EESSI/2023.06.lua +++ b/init/modules/EESSI/2023.06.lua @@ -1,3 +1,4 @@ +-- test help([[ Description =========== From b8c8e9a0c8cc7a0062c65e5b051764710d48597d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2025 13:22:13 +0200 Subject: [PATCH 2/6] add test comment --- init/bash | 1 + 1 file changed, 1 insertion(+) diff --git a/init/bash b/init/bash index 577a2914..e09696db 100644 --- a/init/bash +++ b/init/bash @@ -1,3 +1,4 @@ +# test function show_msg { # only echo msg if EESSI_SILENT is unset msg=$1 From a5a8a755e0361860e8ead2633a009fd764cf9f0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2025 13:35:43 +0200 Subject: [PATCH 3/6] try installing init files to init_new, modules to modules_new --- install_scripts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_scripts.sh b/install_scripts.sh index e1a5ac1a..fd91f208 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -173,7 +173,7 @@ init_files=( minimal_eessi_env README.md test.py lmod_eessi_archdetect_wrapper.sh lmod_eessi_archdetect_wrapper_accel.sh ) -copy_files_by_list ${TOPDIR}/init ${INSTALL_PREFIX}/init "${init_files[@]}" +copy_files_by_list ${TOPDIR}/init ${INSTALL_PREFIX}/init_new "${init_files[@]}" # Copy for the init/arch_specs directory arch_specs_files=( @@ -191,7 +191,7 @@ copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Cast mc_files=( ${EESSI_VERSION}.lua ) -copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules/EESSI "${mc_files[@]}" +copy_files_by_list ${TOPDIR}/init/modules/EESSI ${INSTALL_PREFIX}/init/modules_new/EESSI "${mc_files[@]}" # Copy for init/lmod directory init_script_files=( From d392ae0130b1225b91a2c7eefda9978cda68bf51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2025 13:46:44 +0200 Subject: [PATCH 4/6] cp --preserve=mode --- install_scripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_scripts.sh b/install_scripts.sh index fd91f208..b37b9288 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -80,7 +80,7 @@ compare_and_copy() { else echo "File has changed in the PR" fi - cp "$source_file" "$destination_file" + cp --preserve=mode "$source_file" "$destination_file" echo "File $source_file copied to $destination_file" else case $? in From 78d8d7a28a36045cbee102f5b7da82432ffa4203 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2025 13:49:12 +0200 Subject: [PATCH 5/6] use umask + cat approach --- install_scripts.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/install_scripts.sh b/install_scripts.sh index b37b9288..0fadbc24 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -80,7 +80,9 @@ compare_and_copy() { else echo "File has changed in the PR" fi - cp --preserve=mode "$source_file" "$destination_file" + #cp --preserve=mode "$source_file" "$destination_file" + # Use cat to retain existing permissions, set umask to world readable in case the target file does not yet exist. + (umask 022 && cat "$source_file" "$destination_file") echo "File $source_file copied to $destination_file" else case $? in From 8a99998fccd37fed0a5edbb289c743819bf5a712 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Tue, 15 Jul 2025 13:53:17 +0200 Subject: [PATCH 6/6] add missing > --- install_scripts.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_scripts.sh b/install_scripts.sh index 0fadbc24..5ced58cf 100755 --- a/install_scripts.sh +++ b/install_scripts.sh @@ -82,7 +82,7 @@ compare_and_copy() { fi #cp --preserve=mode "$source_file" "$destination_file" # Use cat to retain existing permissions, set umask to world readable in case the target file does not yet exist. - (umask 022 && cat "$source_file" "$destination_file") + (umask 022 && cat "$source_file" > "$destination_file") echo "File $source_file copied to $destination_file" else case $? in