aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2014-11-19 02:05:44 +0200
committerSergey Poznyakoff <gray@gnu.org.ua>2014-11-19 02:05:44 +0200
commit6f20d264a2095120dd197c1592bc99064ba504cf (patch)
tree22b754ff783aa3911073a0508056124889386cfa
parent57a7d63793de517493499e748ce5d5d82def8a57 (diff)
downloadvarnish-mib-6f20d264a2095120dd197c1592bc99064ba504cf.tar.gz
varnish-mib-6f20d264a2095120dd197c1592bc99064ba504cf.tar.bz2
Add missing files.
-rw-r--r--git2chg.awk75
1 files changed, 75 insertions, 0 deletions
diff --git a/git2chg.awk b/git2chg.awk
new file mode 100644
index 0000000..6dad87e
--- /dev/null
+++ b/git2chg.awk
@@ -0,0 +1,75 @@
1# This file is part of grecs
2# Copyright (C) 2007-2014 Sergey Poznyakoff
3#
4# Grecs is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by
6# the Free Software Foundation; either version 3, or (at your option)
7# any later version.
8#
9# Grecs is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with Grecs. If not, see <http://www.gnu.org/licenses/>.
16
17BEGIN {
18 if (since)
19 split(since,since_a,"-")
20}
21
22function timeok(t, a) {
23 if (!since)
24 return 1
25 split(t,a,"-")
26 if (a[1] < since_a[1])
27 return 0
28 if (a[1] > since_a[1])
29 return 1
30 if (a[2] < since_a[2])
31 return 0
32 if (a[2] > since_a[2])
33 return 1
34 return a[3] > since_a[3]
35}
36
37/^[0-9]+ .* +<[^>]+>/ {
38 s = strftime("%F", $1)
39 if (!timeok(s))
40 exit
41 sub(/^[0-9]+ +/,"")
42 if (s == datestr && author == $0)
43 next
44 datestr = s
45 author = $0
46 if (runlen) { runlen = 0; print "" }
47 printf("%s %s\n", datestr, author)
48 next
49}
50/^Signed-off-by:/ { next }
51/^<unknown>$/ { next }
52NF==0 {
53 runlen++
54 next
55}
56{ if (runlen) { runlen = 0; print "" }
57 print "\t" $0 }
58
59END {
60 if (append) {
61 print ""
62 while ((getline < append) > 0) {
63 if (match($0, /^Local *Variables:/))
64 break
65 print
66 }
67 }
68 print "\f"
69 # Make sure Emacs won't recognize this line:
70 print "Local", "Variables:"
71 print "mode: change-log"
72 print "version-control: never"
73 print "buffer-read-only: t"
74 print "End:"
75}

Return to:

Send suggestions and report system problems to the System administrator.