Skip to content
Snippets Groups Projects
Commit 10b07e63 authored by Simon Mueller's avatar Simon Mueller Committed by Andrew Coward
Browse files

Resolve "Enhanced robustness of the SETTE namelist-file customization"

parent cc7f8410
No related branches found
No related tags found
No related merge requests found
......@@ -292,7 +292,8 @@ set_namelist () {
# Add $VARNAME in namelist file ${EXE_DIR}/$1 in namelist group $NAMGRP
# on mac osx, replace sed --posix by gsed (available with mac port)
sed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || gsed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
sed --posix -e "/${NAMGRP}[ !]/a\ ${VAR_NAME} " -e "/${NAMGRP}$/a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || \
gsed --posix -e "/${NAMGRP}[ !]/a\ ${VAR_NAME} " -e "/${NAMGRP}$/a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
# if file not empty replace ${EXE_DIR}/$1
if [ -s ${EXE_DIR}/$1.tmp ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment