source: BOL/Replay/replay_clean.sh @ 5450

Last change on this file since 5450 was 5449, checked in by fhourdin, 3 days ago

For alternate number of vertical layers

File size: 1.0 KB
RevLine 
[4337]1#!/bin/bash
2
[4347]3
[5444]4f90=f90
[4337]5replay_comment="replay automatic include"
[4347]6if [ $# = 0 ] ; then
[4668]7   \rm -f dump_replay*.h dump_param.h dump_ini.h  input tmp_get_subroutine_arg  tmp_include_line  tmp_include_line*  tmp_include_line*_cpp  tmp_include_line*
8
[5449]9   for file in `grep "$replay_comment" *f90 *F90 | cut -d: -f1` ; do
[4347]10      sed -i"" -e "/$replay_comment/d" $file
11   done
[5444]12   cat > call_param_replay.${f90} <<...eod
[4591]13   subroutine call_param_replay(ngrid,nlay)
14   integer,intent(in) :: ngrid,nlay
15   stop 'In call_param_replay : You should run replay_equip.sh before runing replay[13]d'
16   return
17   end
18...eod
[5444]19   cat > call_ini_replay.${f90} <<...eod
[4591]20   subroutine call_ini_replay
21   stop 'In call_ini_replay : You should run replay_equip.sh before runing replay[13]d'
22   return
23   end
24...eod
25
[4347]26else
27   for file in $* ; do
28       list_include=`grep $replay_comment $file | grep include | cut -d\" -f2`
29       echo removing $list_include
30       \rm -f $list_include
[5444]31       \rm -f dump_replay_`basename $file .${f90}`_*h
[4347]32       sed -i'' -e "/$replay_comment/d" $file
33   done
34fi
Note: See TracBrowser for help on using the repository browser.