Split GetStatus JVM command.
[barry/progweb.git] / maintainer / git-release-tar.sh
blob166dfee5930e8e28683097ce874e6a836ed7400d
1 #!/bin/sh
3 if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
4 echo
5 echo "Usage: ./git-release-tar.sh MAJOR MINOR commit"
6 echo
7 echo "MAJOR is the desired major version number"
8 echo "MINOR is the desired minor version number"
9 echo "commit is a git commit tag to use for the extraction"
10 echo
11 echo "A build directory, containing the packaged results,"
12 echo "will be created in the directory in which this script is _run_."
13 echo
14 echo "It will be assumed _this_ script is inside the git repository"
15 echo "you wish to use. i.e. you are running this script from the"
16 echo "same git repository you want to package."
17 echo
18 echo "Example: mkdir /tmp/play"
19 echo " cd /tmp/play"
20 echo " /path/to/git/repo/barry/maintainer/git-release-tar.sh 0 14 master"
21 echo
22 echo "This will create /tmp/play/build containing the results, and"
23 echo "use /path/to/git/repo as the repository."
24 echo
25 exit 1
28 DIRNAME="barry-$1.$2"
29 TAGNAME="barry-$1_$2"
30 MAJOR="$1"
31 MINOR="$2"
32 COMMIT="$3"
33 RUNDIR="$(cd "$(dirname "$0")" && pwd)"
35 set -e
37 "$RUNDIR/git-extract.sh" $MAJOR $MINOR $COMMIT
38 (cd build/$DIRNAME && "$RUNDIR/tar-prepare.sh")
39 (cd build && "$RUNDIR/tar-create.sh" $MAJOR $MINOR)
40 (cd build && "$RUNDIR/deb-src-create.sh" $MAJOR $MINOR)