summaryrefslogtreecommitdiff
path: root/debian/autogen.sh
blob: ff125d1d27148588942fc9d03f1ad311e83ae3dc (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
#!/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 .