summaryrefslogtreecommitdiffhomepage
path: root/release.sh
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2014-07-27 22:55:29 +0800
committerMatt Johnston <matt@ucc.asn.au>2014-07-27 22:55:29 +0800
commit923fc9087c10a7a2bf4941e3e25f20229b3e5eec (patch)
treea8a5ef8f3483d93f2493d26d235d0445073f823c /release.sh
parent83511fecc0d235cbf7173faf788c934e13c5877f (diff)
- Don't use multichar constants since recent gcc complains
- Add release script - Simplify print_version
Diffstat (limited to 'release.sh')
-rwxr-xr-xrelease.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/release.sh b/release.sh
new file mode 100755
index 0000000..53bbd61
--- /dev/null
+++ b/release.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+VERSION=$(echo '#include "sysoptions.h"\necho DROPBEAR_VERSION' | cpp - | sh)
+echo Releasing version "$VERSION" ...
+if ! head -n1 CHANGES | grep -q $VERSION ; then
+ echo "CHANGES needs updating"
+ exit 1
+fi
+
+if ! head -n1 debian/changelog | grep -q $VERSION ; then
+ echo "CHANGES needs updating"
+ exit 1
+fi
+
+head -n1 CHANGES
+
+#sleep 3
+
+RELDIR=$PWD/../dropbear-$VERSION
+ARCHIVE=${RELDIR}.tar.bz2
+if test -e $RELDIR; then
+ echo "$RELDIR exists"
+ exit 1
+fi
+
+if test -e $ARCHIVE; then
+ echo "$ARCHIVE exists"
+ exit 1
+fi
+
+hg archive "$RELDIR" || exit 2
+
+(cd "$RELDIR" && autoconf && autoheader) || exit 2
+
+rm -r "$RELDIR/autom4te.cache" || exit 2
+
+(cd $RELDIR/.. && tar czf $ARCHIVE `basename "$RELDIR"`) || exit 2
+
+ls -l $ARCHIVE
+openssl sha1 $ARCHIVE
+echo "Done to $ARCHIVE"