source: BOL/Replay/replay_clean.sh @ 5450

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

For alternate number of vertical layers

File size: 1.0 KB
Line 
1#!/bin/bash
2
3
4f90=f90
5replay_comment="replay automatic include"
6if [ $# = 0 ] ; then
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
9   for file in `grep "$replay_comment" *f90 *F90 | cut -d: -f1` ; do
10      sed -i"" -e "/$replay_comment/d" $file
11   done
12   cat > call_param_replay.${f90} <<...eod
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
19   cat > call_ini_replay.${f90} <<...eod
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
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
31       \rm -f dump_replay_`basename $file .${f90}`_*h
32       sed -i'' -e "/$replay_comment/d" $file
33   done
34fi
Note: See TracBrowser for help on using the repository browser.