Skip to content
Newer
Older
100755 55 lines (42 sloc) 1.15 KB
18bd32e @timf Separate build & dist system for standalone context broker, some ant-…
timf authored Jun 10, 2011
1 #!/bin/bash
2
3 if ([ "X$1" == "X--help" ] || [ "X$1" == "X-h" ]); then
4 echo "Usage:"
5 echo "broker-make-dist.sh [<destination directory>] [<git repository>]"
6 echo "Default: make-dist . git://github.com/nimbusproject/nimbus.git"
7 exit 0
8 fi
9
10 if [ "X$2" != "X" ]; then
11 # normalize dir, otherwise it is relative to $co_dir
12 dest_dir=`cd "$1";pwd`
13 else
14 dest_dir=`pwd`
15 fi
16
17 if [ "X$2" != "X" ]; then
18 repo=$2
19 else
20 repo="git://github.com/nimbusproject/nimbus.git"
21 fi
22
23 co_dir=`mktemp -d -t tmp.XXXXXXXXXX`
24
25 echo "Destination directory: $dest_dir"
26 echo "Nimbus git repository: $repo"
27 echo "Created temp directory: $co_dir"
28
29 cd $co_dir
30 git clone $repo
31
32 cd $co_dir/nimbus
33 ant -f scripts/lib/gt4.0/dist/build.xml clean
34 ant -f scripts/lib/gt4.0/brokerdist/build.xml clean-local
35 ant -f scripts/lib/gt4.0/brokerdist/build.xml create-dist
36 if [ $? -ne 0 ]; then
37 echo "create-dist failed"
38 exit 1
39 fi
40
41 ls scripts/lib/gt4.0/brokerdist/result/
42
43 cd scripts/lib/gt4.0/brokerdist/result/
44
45 cp *.tar.gz $dest_dir
46 if [ $? -ne 0 ]; then
47 echo "copy failed"
48 exit 1
49 fi
50
51 echo "Removing temp dir: $co_dir"
52 rm -rf $co_dir
53
54 echo "Finished. Tarballs copied to $dest_dir."
Something went wrong with that request. Please try again.