summaryrefslogtreecommitdiffstats
path: root/fwcutter/makerelease.sh
blob: 093c51130cf9b95d2dab183facee0c598382ee07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

srcdir="$(dirname "$0")"
[ "$(echo "$srcdir" | cut -c1)" = '/' ] || srcdir="$PWD/$srcdir"

srcdir="$srcdir/.." # git repos root

die() { echo "$*"; exit 1; }

# Import the makerelease.lib
# http://bues.ch/gitweb?p=misc.git;a=blob_plain;f=makerelease.lib;hb=HEAD
for path in $(echo "$PATH" | tr ':' ' '); do
	[ -f "$MAKERELEASE_LIB" ] && break
	MAKERELEASE_LIB="$path/makerelease.lib"
done
[ -f "$MAKERELEASE_LIB" ] && . "$MAKERELEASE_LIB" || die "makerelease.lib not found."

hook_get_version()
{
	local file="$1/Makefile"
	version="$(cat "$file" | grep -e VERSION | head -n1 | cut -d' ' -f3)"
}

project=b43-fwcutter
srcsubdir=fwcutter
makerelease "$@"
bues.ch cgit interface