/[MITgcm]/mitgcm.org/sealion/code_reference/hypertree.sh
ViewVC logotype

Contents of /mitgcm.org/sealion/code_reference/hypertree.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (show annotations) (download) (as text)
Wed Oct 24 13:32:32 2001 UTC (23 years, 9 months ago) by cnh
Branch: MAIN
File MIME type: application/x-sh
Saving script that makes call tree clickable before I lose it!
Script takes call tree file called xx and a file f90log as input
xx is an unclickable call tree, f90 log is a list of routine
names and the associated html link. This log is produced by the
program that maps the MITgcm code tree.

Using those to inputs script create callTree.html in which routine
names are linked to appropriate code tree entries.

1 #!/bin/csh -f
2 #
3 # Make a call tree clickable
4 #
5
6 # Log file where keys for names will be found
7 set LFILE = ( f90log )
8
9 # Call tree file
10 set CTFILE = ( xx )
11 set OUTFILE = ( callTree.html )
12
13 # Pull out routine names
14 set rl=`grep '[ |-]*-[A-Z_0-9][A-Z_0-9]*[ (]*.*' $CTFILE | sed s/'[^:]*-\([A-Z_0-9]*\).*/\1/'`
15
16 # Find key for each name in log file
17 echo $rl
18 cp ${CTFILE} ${CTFILE}.alt1
19 foreach n ( $rl )
20 set key = ( `grep '[ ]'$n'[ ]' $LFILE | grep '^New' | awk '{print $6}'` )
21 set sub = `echo "HREF=vdb/names/"$key".htm>"$n"<\/A>"`
22 #echo \"$n\"
23 #echo \"$key\"
24 cat ${CTFILE}.alt1 | sed s'%-'$n'\([ (]\)%-<A '$sub'\1%' > ${CTFILE}.alt2
25 cp ${CTFILE}.alt2 ${CTFILE}.alt1
26 end
27 cp ${CTFILE}.alt1 $OUTFILE

  ViewVC Help
Powered by ViewVC 1.1.22