diff options
author | Emanuele Giaquinta <exg@irssi.org> | 2008-11-01 23:50:58 +0000 |
---|---|---|
committer | exg <exg@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2008-11-01 23:50:58 +0000 |
commit | 200caf1ac6399779b254b6857c21bba7c2a789ac (patch) | |
tree | 710c28b3aa76a279541074db4f384ff913ecd529 /update-changelog.sh | |
parent | aa39fba88d96f1fce6b95f31f96ee902112a0169 (diff) | |
download | irssi-200caf1ac6399779b254b6857c21bba7c2a789ac.zip |
Factor the code to update svn changelog into a script.
git-svn-id: file:///var/www/svn.irssi.org/SVN/irssi/trunk@4880 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'update-changelog.sh')
-rwxr-xr-x | update-changelog.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/update-changelog.sh b/update-changelog.sh new file mode 100755 index 00000000..fe055b88 --- /dev/null +++ b/update-changelog.sh @@ -0,0 +1,15 @@ +#! /bin/sh + +srcdir=$1 +test -d $srcdir/.svn || exit +SVN_VERSION=`LC_ALL=C svn info $srcdir 2>/dev/null | awk '/^Last Changed Rev/{print $4}'` +test -n "$SVN_VERSION" || exit +if test -f $srcdir/ChangeLog; then + CHANGELOG_VERSION=`awk 'NR == 2{print substr($1, 2);exit}' $srcdir/ChangeLog` +fi +if test -z "$CHANGELOG_VERSION"; then + TZ=UTC svn log -v $srcdir > $srcdir/ChangeLog +elif test $SVN_VERSION -ne $CHANGELOG_VERSION; then + TZ=UTC svn log -v --incremental -r $SVN_VERSION:`expr $CHANGELOG_VERSION + 1` $srcdir | \ + cat - $srcdir/ChangeLog > ChangeLog.$$ && mv ChangeLog.$$ $srcdir/ChangeLog +fi |