3 if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" ] ; then
5 echo "Usage: ./release.sh LOGICAL MAJOR MINOR commit [target]"
7 echo "Creates the release tarball from git sources, tests the compile"
8 echo "on local machine, fedora4, fedora5, fedora6."
10 echo "target is an optional filename containing binary package"
11 echo "build instructions. See barrychroots, barrylocal, and"
12 echo "barryremote for more information. The filename must have"
13 echo "the word 'root' in it if you wish it to run as root."
15 echo "You can run this multiple times at the same time, for example"
16 echo "to build both remote and chroot scripts at once."
18 echo "Note: You may wish to direct the output to a file, for"
19 echo " later examination."
21 echo "Example: ./release.sh 0 17 0 master"
22 echo " ./release.sh 0 17 0 master barrychroots"
30 if [ -f build
/barry-
$1.
$2.
$3.
tar.bz2
] ; then
31 echo "Tarball already exists... not creating again."
34 .
/git-release-tar.sh
$1 $2 $3 $4
38 if echo "$5" |
grep root
> /dev
/null
; then
40 su
- -c "export BARRYTARBALL=build/barry-$1.$2.$3.tar.bz2 && \
41 export BARRYTARBASE=barry-$1.$2.$3.tar.bz2 && \
42 export THEMODE=release && \
43 export CHOWNUSER=$(whoami) && \
47 export BARRYTARBALL
=build
/barry-
$1.
$2.
$3.
tar.bz2
48 export BARRYTARBASE
=barry-
$1.
$2.
$3.
tar.bz2
49 export THEMODE
=release
50 export CHOWNUSER
="$(whoami)"
57 echo "Current build directory:"
60 echo "release.sh done"