aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bin
diff options
context:
space:
mode:
Diffstat (limited to 'tools/bin')
-rwxr-xr-xtools/bin/ant107
-rwxr-xr-xtools/bin/ant.bat97
-rwxr-xr-xtools/bin/antRun9
-rwxr-xr-xtools/bin/antRun.bat20
-rwxr-xr-xtools/bin/fix-packages.py216
-rwxr-xr-xtools/bin/lcp.bat2
-rwxr-xr-xtools/bin/runant.pl131
7 files changed, 0 insertions, 582 deletions
diff --git a/tools/bin/ant b/tools/bin/ant
deleted file mode 100755
index 4555bf7089..0000000000
--- a/tools/bin/ant
+++ /dev/null
@@ -1,107 +0,0 @@
-#! /bin/sh
-
-if [ -f "$HOME/.antrc" ] ; then
- . $HOME/.antrc
-fi
-
-# Cygwin support. $cygwin _must_ be set to either true or false.
-case "`uname`" in
- CYGWIN*) cygwin=true ;;
- *) cygwin=false ;;
-esac
-
-# For Cygwin, ensure paths are in UNIX format before anything is touched
-if $cygwin; then
- [ -n "$ANT_HOME" ] &&
- ANT_HOME=`cygpath --unix "$ANT_HOME"`
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
- [ -n "$CLASSPATH" ] &&
- CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
-fi
-
-if [ "$ANT_HOME" = "" ] ; then
- # try to find ANT
- if [ -d /opt/ant ] ; then
- ANT_HOME=/opt/ant
- fi
-
- if [ -d ${HOME}/opt/ant ] ; then
- ANT_HOME=${HOME}/opt/ant
- fi
-
- ## resolve links - $0 may be a link to ant's home
- PRG=$0
- progname=`basename $0`
-
- while [ -h "$PRG" ] ; do
- ls=`ls -ld "$PRG"`
- link=`expr "$ls" : '.*-> \(.*\)$'`
- if expr "$link" : '.*/.*' > /dev/null; then
- PRG="$link"
- else
- PRG="`dirname $PRG`/$link"
- fi
- done
-
- ANT_HOME=`dirname "$PRG"`/..
-
-fi
-
-if [ "$JAVA_HOME" != "" ] ; then
- if [ "$JAVACMD" = "" ] ; then
- JAVACMD=$JAVA_HOME/bin/java
- fi
-else
- if [ "$JAVACMD" = "" ] ; then
- JAVACMD=java
- fi
-fi
-
-# add in the dependency .jar files
-DIRLIBS=${ANT_HOME}/lib/*.jar
-for i in ${DIRLIBS}
-do
- # if the directory is empty, then it will return the input string
- # this is stupid, so case for it
- if [ "$i" != "${DIRLIBS}" ] ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:"$i"
- fi
-done
-
-if [ "$CLASSPATH" != "" ] ; then
- LOCALCLASSPATH=$CLASSPATH:$LOCALCLASSPATH
-fi
-
-if [ "$JAVA_HOME" != "" ] ; then
- if test -f $JAVA_HOME/lib/tools.jar ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/tools.jar
- fi
-
- if test -f $JAVA_HOME/lib/classes.zip ; then
- LOCALCLASSPATH=$LOCALCLASSPATH:$JAVA_HOME/lib/classes.zip
- fi
-else
- echo "Warning: JAVA_HOME environment variable is not set."
- echo " If build fails because sun.* classes could not be found"
- echo " you will need to set the JAVA_HOME environment variable"
- echo " to the installation directory of java."
-fi
-
-# supply JIKESPATH to Ant as jikes.class.path
-if [ "$JIKESPATH" != "" ] ; then
- if [ "$ANT_OPTS" != "" ] ; then
- ANT_OPTS="$ANT_OPTS -Djikes.class.path=$JIKESPATH"
- else
- ANT_OPTS=-Djikes.class.path=$JIKESPATH
- fi
-fi
-
-# For Cygwin, switch paths to Windows format before running java
-if $cygwin; then
- ANT_HOME=`cygpath --path --windows "$ANT_HOME"`
- JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
- LOCALCLASSPATH=`cygpath --path --windows "$LOCALCLASSPATH"`
-fi
-
-$JAVACMD -classpath "$LOCALCLASSPATH" -Dant.home="${ANT_HOME}" $ANT_OPTS org.apache.tools.ant.Main "$@"
diff --git a/tools/bin/ant.bat b/tools/bin/ant.bat
deleted file mode 100755
index e8f8fd1e80..0000000000
--- a/tools/bin/ant.bat
+++ /dev/null
@@ -1,97 +0,0 @@
-@echo off
-
-if exist "%HOME%\antrc_pre.bat" call "%HOME%\antrc_pre.bat"
-
-if not "%OS%"=="Windows_NT" goto win9xStart
-:winNTStart
-@setlocal
-
-rem %~dp0 is name of current script under NT
-set DEFAULT_ANT_HOME=%~dp0
-
-rem : operator works similar to make : operator
-set DEFAULT_ANT_HOME=%DEFAULT_ANT_HOME:\bin\=%
-
-if %ANT_HOME%a==a set ANT_HOME=%DEFAULT_ANT_HOME%
-set DEFAULT_ANT_HOME=
-
-rem On NT/2K grab all arguments at once
-set ANT_CMD_LINE_ARGS=%*
-goto doneStart
-
-:win9xStart
-rem Slurp the command line arguments. This loop allows for an unlimited number of
-rem agruments (up to the command line limit, anyway).
-
-set ANT_CMD_LINE_ARGS=
-
-:setupArgs
-if %1a==a goto doneStart
-set ANT_CMD_LINE_ARGS=%ANT_CMD_LINE_ARGS% %1
-shift
-goto setupArgs
-
-:doneStart
-rem This label provides a place for the argument list loop to break out
-rem and for NT handling to skip to.
-
-rem find ANT_HOME
-if not "%ANT_HOME%"=="" goto checkJava
-
-rem check for ant in Program Files on system drive
-if not exist "%SystemDrive%\Program Files\ant" goto checkSystemDrive
-set ANT_HOME=%SystemDrive%\Program Files\ant
-goto checkJava
-
-:checkSystemDrive
-rem check for ant in root directory of system drive
-if not exist "%SystemDrive%\ant" goto noAntHome
-set ANT_HOME=%SystemDrive%\ant
-goto checkJava
-
-:noAntHome
-echo ANT_HOME is not set and ant could not be located. Please set ANT_HOME.
-goto end
-
-:checkJava
-set _JAVACMD=%JAVACMD%
-set LOCALCLASSPATH="%CLASSPATH%"
-for %%i in ("%ANT_HOME%\lib\*.jar") do call "%ANT_HOME%\bin\lcp.bat" "%%i"
-
-if "%JAVA_HOME%" == "" goto noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java
-if exist "%JAVA_HOME%\lib\tools.jar" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\tools.jar"
-if exist "%JAVA_HOME%\lib\classes.zip" call "%ANT_HOME%\bin\lcp.bat" "%JAVA_HOME%\lib\classes.zip"
-goto checkJikes
-
-:noJavaHome
-if "%_JAVACMD%" == "" set _JAVACMD=java
-echo.
-echo Warning: JAVA_HOME environment variable is not set.
-echo If build fails because sun.* classes could not be found
-echo you will need to set the JAVA_HOME environment variable
-echo to the installation directory of java.
-echo.
-
-:checkJikes
-if not "%JIKESPATH%" == "" goto runAntWithJikes
-
-:runAnt
-%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
-goto end
-
-:runAntWithJikes
-%_JAVACMD% -classpath %LOCALCLASSPATH% -Dant.home="%ANT_HOME%" -Djikes.class.path=%JIKESPATH% %ANT_OPTS% org.apache.tools.ant.Main %ANT_CMD_LINE_ARGS%
-
-:end
-set LOCALCLASSPATH=
-set _JAVACMD=
-set ANT_CMD_LINE_ARGS=
-
-if not "%OS%"=="Windows_NT" goto mainEnd
-:winNTend
-@endlocal
-
-:mainEnd
-if exist "%HOME%\antrc_post.bat" call "%HOME%\antrc_post.bat"
-
diff --git a/tools/bin/antRun b/tools/bin/antRun
deleted file mode 100755
index f0a18f1653..0000000000
--- a/tools/bin/antRun
+++ /dev/null
@@ -1,9 +0,0 @@
-#! /bin/sh
-
-# Args: DIR command
-cd "$1"
-CMD="$2"
-shift
-shift
-
-exec $CMD "$@"
diff --git a/tools/bin/antRun.bat b/tools/bin/antRun.bat
deleted file mode 100755
index a5484d692b..0000000000
--- a/tools/bin/antRun.bat
+++ /dev/null
@@ -1,20 +0,0 @@
-@echo off
-
-# Change drive and directory to %1 (Win9X only for NT/2K use "cd /d")
-cd %1
-%1\
-set ANT_RUN_CMD=%2
-shift
-shift
-
-set PARAMS=
-:loop
-if ""%1 == "" goto runCommand
-set PARAMS=%PARAMS% %1
-shift
-goto loop
-
-:runCommand
-rem echo %ANT_RUN_CMD% %PARAMS%
-%ANT_RUN_CMD% %PARAMS%
-
diff --git a/tools/bin/fix-packages.py b/tools/bin/fix-packages.py
deleted file mode 100755
index 5858c77a7e..0000000000
--- a/tools/bin/fix-packages.py
+++ /dev/null
@@ -1,216 +0,0 @@
-#! /usr/bin/env python
-#
-# Mass string translation for java/xml files (change Wanted re for other files)
-#
-# Author: Peter Donald <donaldp@apache.org>
-#
-# Adapted from fixid.py in python distribution under Tools
-#
-
-import sys
-import re
-import string
-import os
-from stat import *
-import getopt
-
-err = sys.stderr.write
-dbg = err
-out = sys.stdout.write
-
-def usage():
- progname = sys.argv[0]
- err('Usage: ' + progname + ' [-s file] ... file-or-directory ...\n')
- err('\n')
- err('-s substfile : add a file of substitutions\n')
- err('\n')
- err('Each non-empty non-comment line in a substitution file must\n')
- err('contain exactly two words separated by a | character.\n')
-
-def main():
- try:
- opts, args = getopt.getopt(sys.argv[1:], 'crs:')
- except getopt.error, msg:
- err('Options error: ' + str(msg) + '\n')
- usage()
- sys.exit(2)
- bad = 0
- if not args: # No arguments
- usage()
- sys.exit(2)
- for opt, arg in opts:
- if opt == '-s':
- addsubst(arg)
- initre()
- for arg in args:
- if os.path.isdir(arg):
- if recursedown(arg): bad = 1
- elif os.path.islink(arg):
- err(arg + ': will not process symbolic links\n')
- bad = 1
- else:
- if fix(arg): bad = 1
- sys.exit(bad)
-
-# Change this regular expression to select a different set of files
-Wanted = '^[a-zA-Z0-9_\-]+\.(java|xml|xinfo)$'
-def wanted(name):
- return None <> re.match(Wanted, name)
-
-def recursedown(dirname):
- dbg('recursedown(' + `dirname` + ')\n')
- bad = 0
- try:
- names = os.listdir(dirname)
- except os.error, msg:
- err(dirname + ': cannot list directory: ' + str(msg) + '\n')
- return 1
- names.sort()
- subdirs = []
- for name in names:
- if name in (os.curdir, os.pardir): continue
- fullname = os.path.join(dirname, name)
- if os.path.islink(fullname): pass
- elif os.path.isdir(fullname):
- subdirs.append(fullname)
- elif wanted(name):
- if fix(fullname): bad = 1
- for fullname in subdirs:
- if recursedown(fullname): bad = 1
- return bad
-
-def fix(filename):
- dbg('fix(' + `filename` + ')\n')
-
- # File replacement mode
- try:
- f = open(filename, 'r')
- except IOError, msg:
- err(filename + ': cannot open: ' + str(msg) + '\n')
- return 1
-
- head, tail = os.path.split(filename)
- tempname = os.path.join(head, '@' + tail)
-
- # If we find a match, we rewind the file and start over but
- # now copy everything to a temp file.
- lineno = 0
- g = None
- while 1:
- line = f.readline()
- if not line: break
- lineno = lineno + 1
- newline = fixline(line)
- if newline != line:
- if g is None:
- try:
- g = open(tempname, 'w')
- except IOError, msg:
- f.close()
- err(tempname+': cannot create: '+
- str(msg)+'\n')
- return 1
- f.seek(0)
- lineno = 0
- out(filename + ':\n')
- continue # restart from the beginning
- out(`lineno` + '\n')
- out('< ' + line)
- out('> ' + newline)
- if g is not None:
- g.write(newline)
-
- # End of file
- f.close()
- if not g: return 0 # No changes
-
- # Finishing touch -- move files
-
- # First copy the file's mode to the temp file
- try:
- statbuf = os.stat(filename)
- os.chmod(tempname, statbuf[ST_MODE] & 07777)
- except os.error, msg:
- err(tempname + ': warning: chmod failed (' + str(msg) + ')\n')
-
- # Then make a backup of the original file as filename~
- try:
- os.rename(filename, filename + '~')
- except os.error, msg:
- err(filename + ': warning: backup failed (' + str(msg) + ')\n')
-
- # Now move the temp file to the original file
- try:
- os.rename(tempname, filename)
- except os.error, msg:
- err(filename + ': rename failed (' + str(msg) + ')\n')
- return 1
-
- # Return succes
- return 0
-
-def initre():
- global SearcherExpr
-
- keys = Dict.keys()
- keyCount = len(keys)
- i = 0
- reStr = ""
- while i < len(keys):
- if i != 0: reStr = reStr + '|'
- reStr = reStr + keys[i]
- i = i + 1
- SearcherExpr = re.compile( reStr )
-
-def fixline(line):
- global Program
-## print '-->', `line`
- i = 0
-
- while i < len(line):
- match = SearcherExpr.search(line, i)
- if match == None: break
- found = match.group(0)
- i = match.start()
- n = len(found)
- if Dict.has_key(found):
- subst = Dict[found]
-
- line = line[:i] + subst + line[i+n:]
- n = len(subst)
- i = i + n
- return line
-
-Dict = {}
-NotInComment = {}
-
-def addsubst(substfile):
- try:
- fp = open(substfile, 'r')
- except IOError, msg:
- err(substfile + ': cannot read substfile: ' + str(msg) + '\n')
- sys.exit(1)
- lineno = 0
-
- while 1:
- line = fp.readline()
- if not line: break
- lineno = lineno + 1
- try:
- i = string.index(line, '#')
- except string.index_error:
- i = -1 # Happens to delete trailing \n
- words = string.split(line[:i],'|')
- if not words: continue
- if len(words) <> 2:
- err(substfile + ':' + `lineno` + ': warning: bad line: ' + line)
- continue
- [key, value] = words
-
-## print 'Will replace ', key, ' with ', value
-
- Dict[key] = value
-
- fp.close()
-
-main()
diff --git a/tools/bin/lcp.bat b/tools/bin/lcp.bat
deleted file mode 100755
index 8d6b8515ab..0000000000
--- a/tools/bin/lcp.bat
+++ /dev/null
@@ -1,2 +0,0 @@
-set LOCALCLASSPATH=%1;%LOCALCLASSPATH%
-
diff --git a/tools/bin/runant.pl b/tools/bin/runant.pl
deleted file mode 100755
index a2cc523e71..0000000000
--- a/tools/bin/runant.pl
+++ /dev/null
@@ -1,131 +0,0 @@
-#!/usr/bin/perl
-#######################################################################
-#
-# runant.pl
-#
-# wrapper script for invoking ant in a platform with Perl installed
-# this may include cgi-bin invocation, which is considered somewhat daft.
-# (slo: that should be a separate file which can be derived from this
-# and returns the XML formatted output)
-#
-# the code is not totally portable due to classpath and directory splitting
-# issues. oops. (NB, use File::Spec::Functions will help and the code is
-# structured for the catfile() call, but because of perl version funnies
-# the code is not included.
-#
-# created: 2000-8-24
-# last modified: 2000-8-24
-# author: Steve Loughran steve_l@sourceforge.net
-#######################################################################
-#
-# Assumptions:
-#
-# - the "java" executable/script is on the command path
-# - ANT_HOME has been set
-# - target platform uses ":" as classpath separator or perl indicates it is dos/win32
-# - target platform uses "/" as directory separator.
-
-#be fussy about variables
-use strict;
-
-#platform specifics (disabled)
-#use File::Spec::Functions;
-
-#turn warnings on during dev; generates a few spurious uninitialised var access warnings
-#use warnings;
-
-#and set $debug to 1 to turn on trace info
-my $debug=0;
-
-#######################################################################
-#
-# check to make sure environment is setup
-#
-
-my $HOME = $ENV{ANT_HOME};
-if ($HOME eq "")
- {
- die "\n\nANT_HOME *MUST* be set!\n\n";
- }
-
-my $JAVACMD = $ENV{JAVACMD};
-$JAVACMD = "java" if $JAVACMD eq "";
-
-#ISSUE: what java wants to split up classpath varies from platform to platform
-#and perl is not too hot at hinting which box it is on.
-#here I assume ":" 'cept on win32 and dos. Add extra tests here as needed.
-my $s=":";
-if(($^O eq "MSWin32") || ($^O eq "dos"))
- {
- $s=";";
- }
-
-#build up standard classpath
-my $localpath=$ENV{CLASSPATH};
-if ($localpath eq "")
- {
- print "warning: no initial classpath\n" if ($debug);
- $localpath="";
- }
-
-#add jar files. I am sure there is a perl one liner to do this.
-my $jarpattern="$HOME/lib/*.jar";
-my @jarfiles =glob($jarpattern);
-print "jarfiles=@jarfiles\n" if ($debug);
-my $jar;
-foreach $jar (@jarfiles )
- {
- $localpath.="$s$jar";
- }
-
-#if Java home is defined, look for tools.jar & classes.zip and add to classpath
-my $JAVA_HOME = $ENV{JAVA_HOME};
-if ($JAVA_HOME ne "")
- {
- my $tools="$JAVA_HOME/lib/tools.jar";
- if (-e "$tools")
- {
- $localpath .= "$s$tools";
- }
- my $classes="$JAVA_HOME/lib/classes.zip";
- if (-e $classes)
- {
- $localpath .= "$s$classes";
- }
- }
-else
- {
- print "\n\nWarning: JAVA_HOME environment variable is not set.\n".
- "If the build fails because sun.* classes could not be found\n".
- "you will need to set the JAVA_HOME environment variable\n".
- "to the installation directory of java\n";
- }
-
-#jikes
-my @ANT_OPTS=split $ENV{ANT_OPTS};
-if($ENV{JIKESPATH} ne "")
- {
- push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
- }
-
-#construct arguments to java
-
-my @ARGS;
-push @ARGS, "-classpath", "$localpath", "-Dant.home=$HOME";
-push @ARGS, @ANT_OPTS;
-push @ARGS, "org.apache.tools.ant.Main";
-push @ARGS, @ARGV;
-
-print "\n $JAVACMD @ARGS\n\n" if ($debug);
-
-my $returnValue = system $JAVACMD, @ARGS;
-if ($returnValue eq 0)
- {
- exit 0;
- }
-else
- {
- # only 0 and 1 are widely recognized as exit values
- # so change the exit value to 1
- exit 1;
- }