summaryrefslogtreecommitdiff
path: root/netware/BUILD/cron-build
blob: 26ccde28e2a71d5ae6b0c77ac4604d6d0aa1e788 (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#! /bin/sh

# debug
#set -x

# stop on errors
set -e

# repository direcotry
repo_dir=`pwd`

# show usage
show_usage()
{
	cat << EOF

usage: cron-patch

EOF
	exit 0;
}

echo "starting build..."

# check for bk and repo_dir
bk help > /dev/null
repo_dir=`bk root $repo_dir`
cd $repo_dir

# pull latest code
echo 'y' | bk pull

# determine version
version=`grep -e "AM_INIT_AUTOMAKE(mysql, .*)" < configure.in | sed -e "s/AM_INIT_AUTOMAKE(mysql, \(.*\))/\1/"`
echo "version: $version"

# latest revision
rev=`bk changes -e -n -d':REV:' | head -1`
echo "latest revision: $rev"

# run bootstrap
./netware/BUILD/nwbootstrap --revision=$rev --suffix=$rev --build=all

echo "done"