README: Update descr, prereqs, license
[quvi-tool.git] / gen-news.sh
blob217084f4225f0f7b1de9afbfa8b2ca01ba07dd8d
1 #!/bin/sh
3 # quvi
4 # Copyright (C) 2012 Toni Gundogdu <legatvs@gmail.com>
6 # This file is part of quvi <http://quvi.sourceforge.net/>.
8 # This program is free software: you can redistribute it and/or
9 # modify it under the terms of the GNU Affero General Public
10 # License as published by the Free Software Foundation, either
11 # version 3 of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU Affero General Public License for more details.
18 # You should have received a copy of the GNU Affero General
19 # Public License along with this program. If not, see
20 # <http://www.gnu.org/licenses/>.
22 set -e
23 IFS=$'
25 a=`grep < ~/.gitconfig name | cut -f2 -d= | sed 's/^\s*//'`
26 v=`./gen-ver.sh`
27 d=`date +%F`
28 b="$v -- [$d, r:$a]
31 t=`git describe --abbrev=0`
32 for a in `git log --format='%an' "$t"..HEAD | sort | uniq`; do
33 c=`git log --format=" - %s [%h]" --author="$a" "$t"..HEAD | sort -h`
34 b="$b$a:
37 done
38 b="$b
39 `git diff --shortstat "$t"..HEAD`
42 n=`cat NEWS`
43 F=NEWS
44 echo "$b" >"$F" ; echo "$n" >>"$F"