aboutsummaryrefslogtreecommitdiffstats
path: root/science/msms/files/extract-license.awk
blob: c702a5f0dc4eab597379b9c185fbb27bf6cc7a07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
BEGIN { in_licence = 0 }

{
  if (!in_licence && $2 == "LICENSE") {
    in_licence = 1
    print prev_line
    del_count = 1
  } else if (in_licence) {
    if ($1 == "############################################################################") {
      del_count = del_count+1
      if (del_count > 2)
        in_licence = 0
    }
  }

  if (in_licence)
    print $0

  prev_line = $0
}