comparison release.sh @ 948:f92eb625c48d

- Don't use multichar constants since recent gcc complains - Add release script - Simplify print_version
author Matt Johnston <matt@ucc.asn.au>
date Sun, 27 Jul 2014 22:55:29 +0800
parents
children 0d2d39957c02
comparison
equal deleted inserted replaced
947:e4453b367db7 948:f92eb625c48d
1 #!/bin/sh
2 VERSION=$(echo '#include "sysoptions.h"\necho DROPBEAR_VERSION' | cpp - | sh)
3 echo Releasing version "$VERSION" ...
4 if ! head -n1 CHANGES | grep -q $VERSION ; then
5 echo "CHANGES needs updating"
6 exit 1
7 fi
8
9 if ! head -n1 debian/changelog | grep -q $VERSION ; then
10 echo "CHANGES needs updating"
11 exit 1
12 fi
13
14 head -n1 CHANGES
15
16 #sleep 3
17
18 RELDIR=$PWD/../dropbear-$VERSION
19 ARCHIVE=${RELDIR}.tar.bz2
20 if test -e $RELDIR; then
21 echo "$RELDIR exists"
22 exit 1
23 fi
24
25 if test -e $ARCHIVE; then
26 echo "$ARCHIVE exists"
27 exit 1
28 fi
29
30 hg archive "$RELDIR" || exit 2
31
32 (cd "$RELDIR" && autoconf && autoheader) || exit 2
33
34 rm -r "$RELDIR/autom4te.cache" || exit 2
35
36 (cd $RELDIR/.. && tar czf $ARCHIVE `basename "$RELDIR"`) || exit 2
37
38 ls -l $ARCHIVE
39 openssl sha1 $ARCHIVE
40 echo "Done to $ARCHIVE"