Updated copyright date for the new year.
[geda-gaf/whiteaudio.git] / update-changelogs.sh
blob1313a6ee667f45899e053b463d03bb8140497d3c
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 GCLHEADER="# Do not edit this file - generated from version control history"
18 GCLFOOTER="#GCL#"
20 if ! git-log -n1 > /dev/null; then
21 exit $?
24 for cl in $(find . -name ChangeLog); do
25 echo "Updating ${cl}"
26 dir=$(dirname $cl)
27 if tail -n1 ${cl} | grep $GCLFOOTER > /dev/null; then
28 echo -e "$GCLHEADER\n\n" > $cl
29 git-log --pretty=medium $@ -- $dir >> $cl
30 echo -e "\n\n$GCLFOOTER" >> $cl
31 else
32 echo "${cl}: Doesn't appear to be git format log, skipping"
34 done