Skip to content

Commit

Permalink
Merge pull request #644 from GEOS-ESM/bugfix/wjiang/tmpdir_execute
Browse files Browse the repository at this point in the history
remove executables on tmpdir
  • Loading branch information
sdrabenh authored Sep 13, 2024
2 parents dd89afb + 21b6faa commit 9ef8419
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions gcm_setup
Original file line number Diff line number Diff line change
Expand Up @@ -2599,19 +2599,11 @@ foreach rsname ($RSNAMES)
set test = `eval echo \$$rsname`
if( $test == FALSE ) then
foreach type ($RSTYPES)
set TMPCMD = `mktemp`
set string = ${name}_${type}
/bin/rm -f $LOCDIR/$FILE.tmp
/bin/mv -f $LOCDIR/$FILE $LOCDIR/$FILE.tmp
echo cat $LOCDIR/$FILE.tmp \| awk \'\{if \( \$1 \~ \"${string}\" \) \
\{sub \( \/${string}\/ ,\"\#${string}\" \)\;print\} else print\}\' \> $LOCDIR/$FILE > $TMPCMD
chmod +x $TMPCMD
$TMPCMD
/bin/rm -f $TMPCMD
sed -i -e "s/${string}/#${string}/g" $LOCDIR/$FILE
end
endif
end
/bin/rm -f $LOCDIR/$FILE.tmp


# Delete or Enable EXP Configuration Variables
Expand Down

0 comments on commit 9ef8419

Please sign in to comment.