From 66375c60d3bba792cf30d10e6eabdb1356812456 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Mon, 19 Oct 2020 13:43:35 -0600 Subject: [PATCH] deploy_modulefiles.sh.in: add '' after -i for each of the sed commands to avoid writing the NCEPLIBS .lua-e file --- deploy_modulefiles.sh.in | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/deploy_modulefiles.sh.in b/deploy_modulefiles.sh.in index c284c66..1d888ff 100755 --- a/deploy_modulefiles.sh.in +++ b/deploy_modulefiles.sh.in @@ -52,7 +52,7 @@ for libName in $(ls -1 $tmplModulefilesDir); do repl=$(echo ${prefix} | sed -e "s#/#\\\/#g") # Replace #NCEPLIBS_ROOT# from template with $nceplibsInstallDir - sed -i -e "s/#NCEPLIBS_ROOT#/${repl}/g" $dstModulefile + sed -i '' -e "s/#NCEPLIBS_ROOT#/${repl}/g" $dstModulefile # Add to module load commands for umbrella module moduleLoadCommands="${moduleLoadCommands} @@ -74,22 +74,19 @@ mkdir -p $modulesDestDir/NCEPLIBS # Replace #NCEPLIBS_ROOT# from template with $nceplibsInstallDir repl=$(echo ${nceplibsInstallDir} | sed -e "s#/#\\\/#g") -sed -i -e "s/#NCEPLIBS_ROOT#/${repl}/g" $dstModulefile +sed -i '' -e "s/#NCEPLIBS_ROOT#/${repl}/g" $dstModulefile # Set compiler environment variables for the umbrella modulefile repl=$(echo "@CMAKE_C_COMPILER@" | sed -e "s#/#\\\/#g") -sed -i -e "s/#CC#/${repl}/g" $dstModulefile +sed -i '' -e "s/#CC#/${repl}/g" $dstModulefile repl=$(echo "@CMAKE_CXX_COMPILER@" | sed -e "s#/#\\\/#g") -sed -i -e "s/#CXX#/${repl}/g" $dstModulefile +sed -i '' -e "s/#CXX#/${repl}/g" $dstModulefile repl=$(echo "@CMAKE_Fortran_COMPILER@" | sed -e "s#/#\\\/#g") -sed -i -e "s/#FC#/${repl}/g" $dstModulefile +sed -i '' -e "s/#FC#/${repl}/g" $dstModulefile # Append all module load commands to umbrella module echo "${moduleLoadCommands}" >> $dstModulefile -# Temporary workaround: if exists, remove .lua-e file that gets created by sed for a reason I don't understand -rm -vf ${dstModulefile}-e - echo "Done deploying modules ..." echo "Generating shell scripts ..."