From 3d0d4c6e026017fa698ee4357788ebcf42e6502f Mon Sep 17 00:00:00 2001 From: Michael Buesch Date: Tue, 2 Jun 2009 17:49:38 +0200 Subject: [PATCH] fwcutter: Add release script Signed-off-by: Michael Buesch --- fwcutter/Makefile | 2 +- fwcutter/makerelease.sh | 44 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100755 fwcutter/makerelease.sh diff --git a/fwcutter/Makefile b/fwcutter/Makefile index 05d9549..2eb2e84 100644 --- a/fwcutter/Makefile +++ b/fwcutter/Makefile @@ -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 index 0000000..bcb74e0 --- /dev/null +++ b/fwcutter/makerelease.sh @@ -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" -- 2.31.1