summaryrefslogtreecommitdiff
path: root/Admin/update-changelog
blob: 0fcca74699031de3a8f56c92af172c25488e57c2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
#
# Copyright (C) 2014 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

# This file is meant for maintainers of GNU gettext.  It prepends a
# release-announcement entry to all ChangeLog files.
#
#   Usage: update-changelog VERSION USER EMAIL

test $# == 3 || { echo "Usage: $0 VERSION USER EMAIL" 1>&2; exit 1; }

if test ! -d gettext-runtime || test ! -d gettext-tools; then
  echo "$0: run in the top-level directory" 1>&2
  exit 1
fi

ver=$1
user=$2
email=$3

for file in `find . -name "ChangeLog"`; do
  test $file = "./gnulib/ChangeLog" \
    || test $file = "./gettext-tools/examples/hello-c++-kde/admin/ChangeLog" \
    || { { date=`date -u +%Y-%m-%d`;
           cat <<EOF
$date  $user  <$email>

	* gettext $ver released.

EOF
           cat $file; } > $file.tmp && mv $file.tmp $file; }
done