Updated ChangeLogs one more time.
[geda-gaf/whiteaudio.git] / update-changelogs.sh
blobb52e3fbf82a02b71feef0f88f3d41a87a629a980
1 #!/bin/bash
3 # ./update-changelogs.sh <options>
4 # Updates ChangeLog files.
6 # e.g. if the main gEDA branch is called master, then to update all
7 # ChangeLogs with revisions since the switch to git, do:
9 # ./update-changelogs.sh 1.0-20070526..master
11 # This should be only be run while preparing a release, in order to
12 # ensure that the released tarballs contain change logs which can be
13 # viewed without access to the git repository.
17 if [ "$1" == "" ]
18 then
19 echo "usage: ./update-changelogs.sh 1.0-20070526..master"
20 echo " or"
21 echo "usage: ./update-changelogs.sh 1.0-20070526..BRANCH_NAME"
22 exit 1
25 GCLHEADER="# Do not edit this file - generated from version control history"
26 GCLFOOTER="#GCL#"
28 if ! git-log -n1 > /dev/null; then
29 exit $?
32 for cl in $(find . -name ChangeLog); do
33 echo "Updating ${cl}"
34 dir=$(dirname $cl)
35 if tail -n1 ${cl} | grep $GCLFOOTER > /dev/null; then
36 echo -e "$GCLHEADER\n\n" > $cl
37 git-log --pretty=medium $@ -- $dir >> $cl
38 echo -e "\n\n$GCLFOOTER" >> $cl
39 else
40 echo "${cl}: Doesn't appear to be git format log, skipping"
42 done