summaryrefslogtreecommitdiff
path: root/ant-common.sh
blob: d486072dceca9b43fe87029f55d8d74fbfae6256 (plain) (blame)
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
#!/bin/bash
########################################################-*-Shell-script-*-####
# Common settings
##############################################################################
# $Id$

cygwin=false;
darwin=false;
case "`uname`" in
    CYGWIN*) cygwin=true ;;
    Darwin*) darwin=true ;;
esac

##############################################################################
# Apache Ant

ANT_CMD=ant
export ANT_OPTS='-Xmx256M'

##############################################################################
# Shell commands

CP=cp
ECHO=echo
RM='rm -f'
SED=sed

##############################################################################
# set user environment

$ANT_CMD -Dplatform=unix -q -f setenv-nsc.xml
. env.sh

ANT_CONFIG_BUILDFILE=$1.xml
ANT_BUILDFILE=concrete-$ANT_CONFIG_BUILDFILE
ANT_EXCLUDEFILE=developer/${USER}/$1-excludes.xml

if [ -f "$ANT_EXCLUDEFILE" ]; then
  $SED -e "s#userExcludes\ \"\"#userExcludes\ SYSTEM\ \"$ANT_EXCLUDEFILE\"#" \
    < $ANT_CONFIG_BUILDFILE > $ANT_BUILDFILE;
 else
  $CP $ANT_CONFIG_BUILDFILE $ANT_BUILDFILE;
fi

##############################################################################