Changeset 647 for LMDZ4


Ignore:
Timestamp:
Jun 1, 2005, 3:43:43 PM (19 years ago)
Author:
lmdzadmin
Message:

Remplacement des commandes sed créant différents fichiers include F90
par des commandes awk, les sed passant mal à l'IDRIS et au CEA
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/trunk/makegcm

    r644 r647  
    3030###### VERSION LMDZ.4
    3131# set LMDGCM=$HOME/LMDZ.4
    32 #set LMDGCM="`pwd`"
    33 #setenv LIBOGCM $LMDGCM/libo
     32set LMDGCM="`pwd`"
     33setenv LIBOGCM $LMDGCM/libo
    3434#
    3535
     
    729729      \mv $libf/grid/dimensions90.tmp $libf/grid/dimensions90.h
    730730endif
    731 sed -n -e 's/^c/\!/' -e '1 h' -e '2,$ H' -e '$ { x ; s/\n     s/ \&\n     \& /g ; p }' $libf/dyn3d/paramet.h >! $libf/dyn3d/paramet90.tmp
     731awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     s/) {if (NR > 1) print p0," &"; sub ("     s","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/dyn3d/paramet.h >! $libf/dyn3d/paramet90.tmp
     732# sed -n -e 's/^c/\!/' -e '1 h' -e '2,$ H' -e '$ { x ; s/\n     s/ \&\n     \& /g ; p }' $libf/dyn3d/paramet.h >! $libf/dyn3d/paramet90.tmp
    732733if ( ! -f $libf/dyn3d/paramet90.h || `diff $libf/dyn3d/paramet90.tmp $libf/dyn3d/paramet90.h | wc -w` ) then
    733734      \mv $libf/dyn3d/paramet90.tmp $libf/dyn3d/paramet90.h
    734735endif
    735 sed -n -e 's/^c/\!/' -e '1 h' -e '2,$ H' -e '$ { x ; s/\n     \./ \&\n     \& /g ; p }' $libf/dyn3d/control.h >! $libf/dyn3d/control.tmp
     736awk 'BEGIN {} { sub ("^c","\!") ; if ($0 ~ /^     \./) {if (NR > 1) print p0," &"; sub ("     \.","     \\&")} else { if (NR > 1) print p0  } p0=$0 } END { print p0}' $libf/dyn3d/control.h >! $libf/dyn3d/control.tmp
     737#sed -n -e 's/^c/\!/' -e '1 h' -e '2,$ H' -e '$ { x ; s/\n     \./ \&\n     \& /g ; p }' $libf/dyn3d/control.h >! $libf/dyn3d/control.tmp
    736738if ( ! -f $libf/dyn3d/control.inc  || `diff $libf/dyn3d/control.tmp $libf/dyn3d/control.inc | wc -w` ) then
    737739      \mv $libf/dyn3d/control.tmp $libf/dyn3d/control.inc
    738740endif
    739 sed -e 's/^c/\!/' $libf/dyn3dpar/paramet.h >! $libf/dyn3dpar/paramet90.h
     741#sed -e 's/^c/\!/' $libf/dyn3dpar/paramet.h >! $libf/dyn3dpar/paramet90.h
    740742##########################################
    741743cd $model
Note: See TracChangeset for help on using the changeset viewer.