dropbear 2016.73
[tomato.git] / release / src / router / dropbear / release.sh
blobd2abe14cb9b496d9b68ea22f41a68541258b44bf
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
9 if ! head -n1 debian/changelog | grep -q $VERSION ; then
10 echo "debian/changelog needs updating"
11 exit 1
14 head -n1 CHANGES
16 #sleep 3
18 RELDIR=$PWD/../dropbear-$VERSION
19 ARCHIVE=${RELDIR}.tar.bz2
20 if test -e $RELDIR; then
21 echo "$RELDIR exists"
22 exit 1
25 if test -e $ARCHIVE; then
26 echo "$ARCHIVE exists"
27 exit 1
30 hg archive "$RELDIR" || exit 2
32 (cd "$RELDIR" && autoconf && autoheader) || exit 2
34 rm -r "$RELDIR/autom4te.cache" || exit 2
36 rm "$RELDIR/.hgtags"
38 (cd "$RELDIR/.." && tar cjf $ARCHIVE `basename "$RELDIR"`) || exit 2
40 ls -l $ARCHIVE
41 openssl sha -sha256 $ARCHIVE
42 echo Done to
43 echo "$ARCHIVE"
44 echo Sign it with
45 echo gpg2 --detach-sign -a -u F29C6773 "$ARCHIVE"