fwcutter: Add release script
authorMichael Buesch <mb@bu3sch.de>
Tue, 2 Jun 2009 15:49:38 +0000 (17:49 +0200)
committerMichael Buesch <mb@bu3sch.de>
Tue, 2 Jun 2009 15:49:38 +0000 (17:49 +0200)
Signed-off-by: Michael Buesch <mb@bu3sch.de>
fwcutter/Makefile
fwcutter/makerelease.sh [new file with mode: 0755]

index 05d9549f187c90433a87fe184c60a71de8cdf69f..2eb2e84cb3899fd11766232055b27b69ae5d667b 100644 (file)
@@ -1,4 +1,4 @@
-VERSION = 011
+VERSION = 012
 
 CC ?= cc
 PREFIX ?= /usr/local
diff --git a/fwcutter/makerelease.sh b/fwcutter/makerelease.sh
new file mode 100755 (executable)
index 0000000..bcb74e0
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/bash
+set -e
+
+project="b43-fwcutter"
+
+
+origin="$(pwd)"
+version="$(cat $origin/Makefile | grep -e VERSION | head -n1 | cut -d' ' -f3)"
+if [ -z "$version" ]; then
+       echo "Could not determine version!"
+       exit 1
+fi
+release_name="$project-$version"
+tarball="$release_name.tar.bz2"
+
+export GIT_DIR="$origin/../.git"
+
+cd /tmp/
+rm -Rf "$release_name"
+echo "Creating target directory"
+mkdir "$release_name"
+cd "$release_name"
+echo "git checkout"
+git checkout -f
+mv fwcutter $release_name
+cd $release_name
+
+rm makerelease.sh
+
+echo "creating tarball"
+cd ..
+tar cjf "$tarball" "$release_name"
+mv "$tarball" "$origin"
+
+echo "running testbuild"
+cd "$release_name"
+make
+
+echo "removing testbuild"
+cd ../..
+rm -R "$release_name"
+
+echo
+echo "built release $version"