| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | f90=f90 |
|---|
| 5 | replay_comment="replay automatic include" |
|---|
| 6 | if [ $# = 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 subroutine call_param_replay |
|---|
| 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 subroutine call_ini_replay |
|---|
| 24 | ...eod |
|---|
| 25 | |
|---|
| 26 | else |
|---|
| 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 |
|---|
| 34 | fi |
|---|
Note: See
TracBrowser
for help on using the repository browser.