File: pmake.sh

package info (click to toggle)
libgroboutils-java 5-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 8,496 kB
  • sloc: java: 59,880; xml: 12,762; sh: 377; perl: 104; makefile: 20
file content (33 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (3)
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
#! /bin/bash

if [ -z $1 ]; then
    echo "You must specify the project as argument 1."
    exit 1
fi

_HERE=`dirname $0`
echo "_HERE = $_HERE"
if [ -z $_HERE -o "$_HERE" = "." ]; then
    _HERE=`pwd`
fi

if [ ! -f "$_HERE/$1/build.xml" ]; then
    echo "$1 is not a known/valid project."
    exit 1
fi

_PROJECT="$_HERE/$1"
shift
_ARGS="$*"

# OS specific support.  $var _must_ be set to either true or false.
case "`uname`" in
  CYGWIN*) _PROJECT=`cygpath --windows "$_PROJECT"` ;;
esac

if [ ! -f $_HERE/make.sh ]; then
	echo "Bad directory?"
	$_HERE=`dirname $_HERE/make.sh`
fi

. $_HERE/make.sh -f "$_PROJECT/build.xml" "-Dbasedir=$_PROJECT" $_ARGS