source:
trunk/NEMOGCM/TRUST/inc/svn_abstract.awk
@
7584
Last change on this file since 7584 was 6222, checked in by timgraham, 9 years ago | |
---|---|
File size: 1.0 KB |
Rev | Line | |
---|---|---|
[6222] | 1 | #!/bin/awk |
2 | ||
3 | BEGIN{} | |
4 | ||
5 | func relative_path() { sub(/.*NEMOGCM\/[[:upper:]]*\//,//); return substr($0,2) } | |
6 | ||
7 | func array_loop(action,nb,array) { | |
8 | if ( nb != 0 ) { | |
9 | printf("\n%-10s: %3d\n\t",action,nb) | |
10 | j = 0 | |
11 | for (i in array) { | |
12 | j += 1 | |
13 | printf("%-45s\t",array[i]) | |
14 | if ( j % 3 == 0 && j != nb ) { printf"\n\t" } | |
15 | } | |
16 | } | |
17 | } | |
18 | ||
19 | /^A[[:upper:] ]/ { acount += 1; aroutines[acount] = relative_path() } | |
20 | /^C[[:upper:] ]/ { ccount += 1; croutines[ccount] = relative_path() } | |
21 | /^D[[:upper:] ]/ { dcount += 1; droutines[dcount] = relative_path() } | |
22 | /^E[[:upper:] ]/ { ecount += 1; eroutines[ecount] = relative_path() } | |
23 | /^G[[:upper:] ]/ { gcount += 1; groutines[gcount] = relative_path() } | |
24 | /^U[[:upper:] ]/ { ucount += 1; uroutines[ucount] = relative_path() } | |
25 | ||
26 | END{ | |
27 | array_loop("added", acount,aroutines) | |
28 | array_loop("conflicted",ccount,croutines) | |
29 | array_loop("deleted", dcount,droutines) | |
30 | array_loop("edited", ecount,eroutines) | |
31 | array_loop("merged", gcount,groutines) | |
32 | array_loop("updated", ucount,uroutines) | |
33 | printf "\n" | |
34 | } |
Note: See TracBrowser
for help on using the repository browser.