diff options
author | Tom Grennan <tgrennan@vyatta.com> | 2007-09-20 18:43:23 -0700 |
---|---|---|
committer | Tom Grennan <tgrennan@vyatta.com> | 2007-09-20 18:43:23 -0700 |
commit | 00b78e597b6e3aa1fd65ffdd7ea1ff2a2ac019d5 (patch) | |
tree | fcb84cdd6185730b49f58621ed751dae9e790d51 /debian/autogen.sh | |
parent | 64e83f470a7076b63bd9b76c7b6bb516cbe9bb92 (diff) | |
download | vyatta-op-00b78e597b6e3aa1fd65ffdd7ea1ff2a2ac019d5.tar.gz vyatta-op-00b78e597b6e3aa1fd65ffdd7ea1ff2a2ac019d5.zip |
merge ChangeLog generation, repo info and autoreconf into
debian/autogen.sh that is in turn run from debian/rules
Diffstat (limited to 'debian/autogen.sh')
-rwxr-xr-x | debian/autogen.sh | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/debian/autogen.sh b/debian/autogen.sh new file mode 100755 index 0000000..ff125d1 --- /dev/null +++ b/debian/autogen.sh @@ -0,0 +1,37 @@ +#!/bin/sh + + +if [ -d .git ] ; then +# generate GNU/Debian format ChangeLog from git log + + rm -f ChangeLog + + if which git2cl >/dev/null ; then + git-log --pretty --numstat --summary | git2cl >> ChangeLog + else + git-log --pretty=short >> ChangeLog + fi + +# append repository reference + + url=` git repo-config --get remote.origin.url` + test "x$url" = "x" && url=`pwd` + + branch=`git-branch --no-color | sed '/^\* /!d; s/^\* //'` + test "x$branch" = "x" && branch=master + + sha=`git log --pretty=oneline --no-color -n 1 | cut -c-8` + test "x$sha" = "x" && sha=00000000 + + echo "$url#$branch-$sha" >> ChangeLog + +fi + +rm -rf config +rm -f aclocal.m4 config.guess config.statusconfig.sub configure INSTALL + +autoreconf --force --install + +rm -f config.sub config.guess +ln -s /usr/share/misc/config.sub . +ln -s /usr/share/misc/config.guess . |