From 6c2eeae273552ed0be32b90d0c5604d07509e454 Mon Sep 17 00:00:00 2001 From: michelou Date: Wed, 31 Aug 2005 09:25:58 +0000 Subject: - added shell variables. - added CVS header. --- ant-common.sh | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'ant-common.sh') diff --git a/ant-common.sh b/ant-common.sh index 7da266bd54..2ff38e8eca 100755 --- a/ant-common.sh +++ b/ant-common.sh @@ -1,19 +1,45 @@ -#!/bin/sh +#!/bin/bash +########################################################-*-Shell-script-*-#### +# Common settings +############################################################################## +# $Id$ -export ANT_OPTS=-Xmx256m +############################################################################## +# Apache Ant -awk '/^$/ {next;} /^#/ {next;} {print "export " $1 $2 $3}' build-nsc.properties > env.sh +ANT_CMD=ant +#ANT_OPTS='-Xmx256m -Xms256M' +ANT_OPTS= + +############################################################################## +# Shell commands + +AWK=awk +CP=cp +ECHO=echo +RM='rm -f' +SED=sed + +############################################################################## +# set user environment + +$AWK '/^$/ {next;} /^#/ {next;} {print "export " $1 $2 $3}' \ + build-nsc.properties > env.sh . env.sh # ------- don't change these, change build-nsc.properties instead function addJar() { # string -> void - if [ -f $1 ]; then - CLASSPATH=$1:$CLASSPATH; + local jarfile="$1"; shift 1; + local jarname="$1"; + if [ -f $jarfile ]; then + CLASSPATH=$jarfile:$CLASSPATH; return 0; else - echo you supplied $1 for $2, but it does not exists; + $ECHO you supplied $jarfile for $jarname, but it does not exists; return -1; fi } + +############################################################################## -- cgit v1.2.3