Initialize some stuff to 0 before taking their address
[openbox.git] / makedeb
blobec0d62066e2eb5481b8a8e58e190d65e02da6d92
1 #!/bin/sh
3 if test "$1" = "ubuntu"; then
4 APPEND="ubuntu1";
5 else
6 if test "$1" = "debian"; then
7 APPEND="";
8 else
9 echo "Usage: makedeb [ubuntu|debian]";
10 exit 1;
14 # get the version from configure.ac
15 VERSION=$(grep AC_INIT\(\\\[openbox\\] configure.ac|cut -d [ -f 3-|cut -d ] -f 1)
17 echo
18 echo "Building deb for openbox-$VERSION-0$APPEND"
19 echo
21 TIME="$(date '+%a, %d %B %Y %T %z')"
23 IN=debian/changelog.in
24 OUT=debian/changelog
26 # make sure configure gets run with the right parameters
27 make distclean > /dev/null || rm -f config.status
29 rm -f $OUT
31 sed -e "s!@time@!$TIME!" -e "s!@version@!$VERSION-0$APPEND!" $IN >$OUT && \
32 fakeroot debian/rules binary && \
33 make distclean > /dev/null