kvm 0.0.1.pre
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +3 -0
- data/.rvmrc +1 -0
- data/AGPL-3.0 +661 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +32 -0
- data/LICENSE +23 -0
- data/README.md +73 -0
- data/Rakefile +48 -0
- data/bin/kvm +6 -0
- data/kvm.gemspec +28 -0
- data/lib/kvm.rb +286 -0
- data/lib/kvm/archive.rb +56 -0
- data/lib/kvm/artifact.rb +28 -0
- data/lib/kvm/db/jdbc_adapter.rb +71 -0
- data/lib/kvm/db/oracle.rb +23 -0
- data/lib/kvm/db/types.rb +11 -0
- data/lib/kvm/impex.rb +109 -0
- data/lib/kvm/log.rb +7 -0
- data/lib/kvm/resource.rb +72 -0
- data/lib/kvm/rice_release.rb +79 -0
- data/lib/kvm/rice_release_generated_dataset.rb +68 -0
- data/lib/kvm/source.rb +33 -0
- data/lib/kvm/subversion.rb +52 -0
- data/lib/kvm/version.rb +3 -0
- data/lib/kvm/wallet.rb +64 -0
- data/support/ant/INSTALL +2 -0
- data/support/ant/KEYS +1398 -0
- data/support/ant/LICENSE +272 -0
- data/support/ant/NOTICE +6 -0
- data/support/ant/README +97 -0
- data/support/ant/WHATSNEW +5467 -0
- data/support/ant/bin/ant +335 -0
- data/support/ant/bin/ant.bat +218 -0
- data/support/ant/bin/ant.cmd +93 -0
- data/support/ant/bin/antRun +24 -0
- data/support/ant/bin/antRun.bat +50 -0
- data/support/ant/bin/antRun.pl +66 -0
- data/support/ant/bin/antenv.cmd +98 -0
- data/support/ant/bin/complete-ant-cmd.pl +114 -0
- data/support/ant/bin/envset.cmd +131 -0
- data/support/ant/bin/lcp.bat +31 -0
- data/support/ant/bin/runant.pl +153 -0
- data/support/ant/bin/runant.py +102 -0
- data/support/ant/bin/runrc.cmd +60 -0
- data/support/ant/etc/ant-bootstrap.jar +0 -0
- data/support/ant/etc/changelog.xsl +148 -0
- data/support/ant/etc/checkstyle/checkstyle-frames.xsl +299 -0
- data/support/ant/etc/checkstyle/checkstyle-text.xsl +34 -0
- data/support/ant/etc/checkstyle/checkstyle-xdoc.xsl +130 -0
- data/support/ant/etc/coverage-frames.xsl +489 -0
- data/support/ant/etc/jdepend-frames.xsl +487 -0
- data/support/ant/etc/jdepend.xsl +276 -0
- data/support/ant/etc/junit-frames-xalan1.xsl +733 -0
- data/support/ant/etc/junit-frames.xsl +902 -0
- data/support/ant/etc/junit-noframes.xsl +478 -0
- data/support/ant/etc/log.xsl +203 -0
- data/support/ant/etc/maudit-frames.xsl +503 -0
- data/support/ant/etc/mmetrics-frames.xsl +1026 -0
- data/support/ant/etc/tagdiff.xsl +179 -0
- data/support/ant/fetch.xml +343 -0
- data/support/ant/get-m2.xml +121 -0
- data/support/ant/lib/README +3 -0
- data/support/ant/lib/ant-antlr.jar +0 -0
- data/support/ant/lib/ant-antlr.pom +76 -0
- data/support/ant/lib/ant-apache-bcel.jar +0 -0
- data/support/ant/lib/ant-apache-bcel.pom +72 -0
- data/support/ant/lib/ant-apache-bsf.jar +0 -0
- data/support/ant/lib/ant-apache-bsf.pom +75 -0
- data/support/ant/lib/ant-apache-log4j.jar +0 -0
- data/support/ant/lib/ant-apache-log4j.pom +70 -0
- data/support/ant/lib/ant-apache-oro.jar +0 -0
- data/support/ant/lib/ant-apache-oro.pom +75 -0
- data/support/ant/lib/ant-apache-regexp.jar +0 -0
- data/support/ant/lib/ant-apache-regexp.pom +71 -0
- data/support/ant/lib/ant-apache-resolver.jar +0 -0
- data/support/ant/lib/ant-apache-resolver.pom +70 -0
- data/support/ant/lib/ant-apache-xalan2.jar +0 -0
- data/support/ant/lib/ant-apache-xalan2.pom +95 -0
- data/support/ant/lib/ant-commons-logging.jar +0 -0
- data/support/ant/lib/ant-commons-logging.pom +71 -0
- data/support/ant/lib/ant-commons-net.jar +0 -0
- data/support/ant/lib/ant-commons-net.pom +76 -0
- data/support/ant/lib/ant-jai.jar +0 -0
- data/support/ant/lib/ant-jai.pom +85 -0
- data/support/ant/lib/ant-javamail.jar +0 -0
- data/support/ant/lib/ant-javamail.pom +79 -0
- data/support/ant/lib/ant-jdepend.jar +0 -0
- data/support/ant/lib/ant-jdepend.pom +73 -0
- data/support/ant/lib/ant-jmf.jar +0 -0
- data/support/ant/lib/ant-jmf.pom +66 -0
- data/support/ant/lib/ant-jsch.jar +0 -0
- data/support/ant/lib/ant-jsch.pom +75 -0
- data/support/ant/lib/ant-junit.jar +0 -0
- data/support/ant/lib/ant-junit.pom +101 -0
- data/support/ant/lib/ant-junit4.jar +0 -0
- data/support/ant/lib/ant-junit4.pom +71 -0
- data/support/ant/lib/ant-launcher.jar +0 -0
- data/support/ant/lib/ant-launcher.pom +58 -0
- data/support/ant/lib/ant-netrexx.jar +0 -0
- data/support/ant/lib/ant-netrexx.pom +99 -0
- data/support/ant/lib/ant-parent.pom +120 -0
- data/support/ant/lib/ant-swing.jar +0 -0
- data/support/ant/lib/ant-swing.pom +67 -0
- data/support/ant/lib/ant-testutil.jar +0 -0
- data/support/ant/lib/ant-testutil.pom +75 -0
- data/support/ant/lib/ant.jar +0 -0
- data/support/ant/lib/ant.pom +222 -0
- data/support/ant/lib/libraries.properties +65 -0
- data/test/data/files/rice-0.0.0.0-bin.tar.gz +0 -0
- data/test/data/svn/README.txt +5 -0
- data/test/data/svn/conf/authz +32 -0
- data/test/data/svn/conf/passwd +8 -0
- data/test/data/svn/conf/svnserve.conf +47 -0
- data/test/data/svn/db/current +1 -0
- data/test/data/svn/db/format +2 -0
- data/test/data/svn/db/fs-type +1 -0
- data/test/data/svn/db/fsfs.conf +37 -0
- data/test/data/svn/db/min-unpacked-rev +1 -0
- data/test/data/svn/db/rep-cache.db +0 -0
- data/test/data/svn/db/revprops/0/0 +5 -0
- data/test/data/svn/db/revprops/0/1 +13 -0
- data/test/data/svn/db/revs/0/0 +11 -0
- data/test/data/svn/db/revs/0/1 +0 -0
- data/test/data/svn/db/txn-current +1 -0
- data/test/data/svn/db/txn-current-lock +0 -0
- data/test/data/svn/db/uuid +1 -0
- data/test/data/svn/db/write-lock +0 -0
- data/test/data/svn/format +1 -0
- data/test/data/svn/hooks/post-commit.tmpl +50 -0
- data/test/data/svn/hooks/post-lock.tmpl +44 -0
- data/test/data/svn/hooks/post-revprop-change.tmpl +56 -0
- data/test/data/svn/hooks/post-unlock.tmpl +42 -0
- data/test/data/svn/hooks/pre-commit.tmpl +81 -0
- data/test/data/svn/hooks/pre-lock.tmpl +71 -0
- data/test/data/svn/hooks/pre-revprop-change.tmpl +66 -0
- data/test/data/svn/hooks/pre-unlock.tmpl +63 -0
- data/test/data/svn/hooks/start-commit.tmpl +65 -0
- data/test/data/svn/locks/db-logs.lock +3 -0
- data/test/data/svn/locks/db.lock +3 -0
- data/test/helper.rb +146 -0
- data/test/int_test_generate_sql.rb +58 -0
- data/test/test_archive.rb +35 -0
- data/test/test_generate_sql.rb +0 -0
- data/test/test_rice_release.rb +61 -0
- data/test/test_rice_release_generated_dataset.rb +12 -0
- data/test/test_source.rb +31 -0
- data/test/test_subversion.rb +20 -0
- metadata +298 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/*
|
|
2
|
+
|
|
3
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+
contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+
this work for additional information regarding copyright ownership.
|
|
6
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+
(the "License"); you may not use this file except in compliance with
|
|
8
|
+
the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
See the License for the specific language governing permissions and
|
|
16
|
+
limitations under the License.
|
|
17
|
+
|
|
18
|
+
SET environment variables
|
|
19
|
+
First optional parameter:
|
|
20
|
+
; parameters are considered parts of a path variable, semicolons are
|
|
21
|
+
appended to each element if not already present
|
|
22
|
+
-D parameters are properties for Java or Makefile etc., -D will be
|
|
23
|
+
prepended and the parameters will be separated by a space
|
|
24
|
+
=D the same as above but equal sign is not required
|
|
25
|
+
, parameters should be comma separated in the environment variable
|
|
26
|
+
- parameters should be separated by the next parameter
|
|
27
|
+
Other values mean that the first parameter is missing and the environment
|
|
28
|
+
variable will be set to the space separated parameters
|
|
29
|
+
|
|
30
|
+
Second parameter: name of the environment variable
|
|
31
|
+
|
|
32
|
+
Next parameters: values
|
|
33
|
+
; implies that the equal sign is considered a part of the parameter and is
|
|
34
|
+
not interpreted
|
|
35
|
+
|
|
36
|
+
-D requires parameters in the form name=value. If the equal sign is not found,
|
|
37
|
+
the parameters are changed to name=expanded_name
|
|
38
|
+
|
|
39
|
+
Other options have optional equal sign. If it is found, only the part after
|
|
40
|
+
the equal sign will be oprionally expanded.
|
|
41
|
+
|
|
42
|
+
If the parameter is the minus sign, the next parameter will not be expanded.
|
|
43
|
+
If the parameter is a single dot, it will be replaced with the value of the
|
|
44
|
+
environment variable as it existed before envset was invoked.
|
|
45
|
+
|
|
46
|
+
For other parameters the batch looks for the environment variable with the
|
|
47
|
+
same name (in uppercase). If it is found, it forms the expanded_name. If
|
|
48
|
+
the environment variable with such a name does not exist, the expanded_name
|
|
49
|
+
will hold the parameter name without case conversion.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
parse arg mode envar args
|
|
53
|
+
|
|
54
|
+
equal = 0
|
|
55
|
+
sep = ' '
|
|
56
|
+
|
|
57
|
+
/* Parse command line parameters */
|
|
58
|
+
select
|
|
59
|
+
when mode='-' then do
|
|
60
|
+
sep = envar
|
|
61
|
+
parse var args envar args
|
|
62
|
+
end
|
|
63
|
+
when mode=';' then do
|
|
64
|
+
sep = ''
|
|
65
|
+
equal = -1
|
|
66
|
+
end
|
|
67
|
+
when mode='-D' then equal = 1
|
|
68
|
+
when mode='=D' then mode = '-D'
|
|
69
|
+
when mode=',' then sep = ','
|
|
70
|
+
otherwise
|
|
71
|
+
args = envar args
|
|
72
|
+
envar = mode
|
|
73
|
+
mode = ''
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
env = 'OS2ENVIRONMENT'
|
|
77
|
+
envar = translate(envar)
|
|
78
|
+
orig = value(envar,,env)
|
|
79
|
+
newval = ''
|
|
80
|
+
expand = 1
|
|
81
|
+
|
|
82
|
+
/* for each parameter... */
|
|
83
|
+
do i = 1 to words(args)
|
|
84
|
+
if expand > 0 & word(args, i) = '-' then expand = 0
|
|
85
|
+
else call addval word(args, i)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
/* Optionally enclose path variable by quotes */
|
|
89
|
+
if mode = ';' & pos(' ', newval) > 0 then newval = '"' || newval || '"'
|
|
90
|
+
|
|
91
|
+
/* Set the new value, 'SET' cannot be used since it does not allow '=' */
|
|
92
|
+
x = value(envar, newval, env)
|
|
93
|
+
exit 0
|
|
94
|
+
|
|
95
|
+
addval: procedure expose sep equal orig expand newval mode env
|
|
96
|
+
parse arg var
|
|
97
|
+
|
|
98
|
+
if var = '.' then expvar = orig
|
|
99
|
+
else do
|
|
100
|
+
if equal >= 0 then do
|
|
101
|
+
parse var var name '=' val
|
|
102
|
+
if val = '' then var = name
|
|
103
|
+
else var = val
|
|
104
|
+
end
|
|
105
|
+
if expand = 0 then expvar = var
|
|
106
|
+
else expvar = value(translate(var),,env)
|
|
107
|
+
if expvar = '' then expvar = var
|
|
108
|
+
if equal >= 0 then do
|
|
109
|
+
if val = '' then do
|
|
110
|
+
parse var expvar key '=' val
|
|
111
|
+
if val <> '' then name = key
|
|
112
|
+
else do
|
|
113
|
+
if equal > 0 then val = key
|
|
114
|
+
else name = key
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
else val = expvar
|
|
118
|
+
if pos(' ', val) > 0 | pos('=', val) > 0 then val = '"' || val || '"'
|
|
119
|
+
if val = '' then expvar = name
|
|
120
|
+
else expvar = name || '=' || val
|
|
121
|
+
end
|
|
122
|
+
if mode = '-D' then expvar = '-D' || expvar
|
|
123
|
+
if mode = ';' then do
|
|
124
|
+
if right(expvar, 1) <> ';' then expvar = expvar || ';'
|
|
125
|
+
end
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if newval = '' then newval = expvar
|
|
129
|
+
else newval = newval || sep || expvar
|
|
130
|
+
expand = 1
|
|
131
|
+
return
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
REM
|
|
2
|
+
REM Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
REM contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
REM this work for additional information regarding copyright ownership.
|
|
5
|
+
REM The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
REM (the "License"); you may not use this file except in compliance with
|
|
7
|
+
REM the License. You may obtain a copy of the License at
|
|
8
|
+
REM
|
|
9
|
+
REM http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
REM
|
|
11
|
+
REM Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
REM distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
REM See the License for the specific language governing permissions and
|
|
15
|
+
REM limitations under the License.
|
|
16
|
+
REM
|
|
17
|
+
REM
|
|
18
|
+
|
|
19
|
+
set _CLASSPATHCOMPONENT=%1
|
|
20
|
+
if ""%1""=="""" goto gotAllArgs
|
|
21
|
+
shift
|
|
22
|
+
|
|
23
|
+
:argCheck
|
|
24
|
+
if ""%1""=="""" goto gotAllArgs
|
|
25
|
+
set _CLASSPATHCOMPONENT=%_CLASSPATHCOMPONENT% %1
|
|
26
|
+
shift
|
|
27
|
+
goto argCheck
|
|
28
|
+
|
|
29
|
+
:gotAllArgs
|
|
30
|
+
set LOCALCLASSPATH=%LOCALCLASSPATH%;%_CLASSPATHCOMPONENT%
|
|
31
|
+
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
#!/usr/bin/perl
|
|
2
|
+
#
|
|
3
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
4
|
+
# contributor license agreements. See the NOTICE file distributed with
|
|
5
|
+
# this work for additional information regarding copyright ownership.
|
|
6
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
7
|
+
# (the "License"); you may not use this file except in compliance with
|
|
8
|
+
# the License. You may obtain a copy of the License at
|
|
9
|
+
#
|
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
#
|
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
# See the License for the specific language governing permissions and
|
|
16
|
+
# limitations under the License.
|
|
17
|
+
#
|
|
18
|
+
#######################################################################
|
|
19
|
+
#
|
|
20
|
+
# runant.pl
|
|
21
|
+
#
|
|
22
|
+
# wrapper script for invoking ant in a platform with Perl installed
|
|
23
|
+
# this may include cgi-bin invocation, which is considered somewhat daft.
|
|
24
|
+
# (slo: that should be a separate file which can be derived from this
|
|
25
|
+
# and returns the XML formatted output)
|
|
26
|
+
#
|
|
27
|
+
# the code is not totally portable due to classpath and directory splitting
|
|
28
|
+
# issues. oops. (NB, use File::Spec::Functions will help and the code is
|
|
29
|
+
# structured for the catfile() call, but because of perl version funnies
|
|
30
|
+
# the code is not included.
|
|
31
|
+
#
|
|
32
|
+
# created: 2000-8-24
|
|
33
|
+
# author: Steve Loughran steve_l@sourceforge.net
|
|
34
|
+
#######################################################################
|
|
35
|
+
#
|
|
36
|
+
# Assumptions:
|
|
37
|
+
#
|
|
38
|
+
# - the "java" executable/script is on the command path
|
|
39
|
+
# - ANT_HOME has been set
|
|
40
|
+
# - target platform uses ":" as classpath separator or perl indicates it is dos/win32
|
|
41
|
+
# - target platform uses "/" as directory separator.
|
|
42
|
+
|
|
43
|
+
#be fussy about variables
|
|
44
|
+
use strict;
|
|
45
|
+
|
|
46
|
+
#platform specifics (disabled)
|
|
47
|
+
#use File::Spec::Functions;
|
|
48
|
+
|
|
49
|
+
#turn warnings on during dev; generates a few spurious uninitialised var access warnings
|
|
50
|
+
#use warnings;
|
|
51
|
+
|
|
52
|
+
#and set $debug to 1 to turn on trace info
|
|
53
|
+
my $debug=1;
|
|
54
|
+
|
|
55
|
+
#######################################################################
|
|
56
|
+
#
|
|
57
|
+
# check to make sure environment is setup
|
|
58
|
+
#
|
|
59
|
+
|
|
60
|
+
my $HOME = $ENV{ANT_HOME};
|
|
61
|
+
if ($HOME eq "")
|
|
62
|
+
{
|
|
63
|
+
die "\n\nANT_HOME *MUST* be set!\n\n";
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
my $JAVACMD = $ENV{JAVACMD};
|
|
67
|
+
$JAVACMD = "java" if $JAVACMD eq "";
|
|
68
|
+
|
|
69
|
+
my $onnetware = 0;
|
|
70
|
+
if ($^O eq "NetWare")
|
|
71
|
+
{
|
|
72
|
+
$onnetware = 1;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
my $oncygwin = ($^O eq "cygwin");
|
|
76
|
+
|
|
77
|
+
#ISSUE: what java wants to split up classpath varies from platform to platform
|
|
78
|
+
#and perl is not too hot at hinting which box it is on.
|
|
79
|
+
#here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed.
|
|
80
|
+
my $s=":";
|
|
81
|
+
if(($^O eq "MSWin32") || ($^O eq "dos") || ($^O eq "cygwin") ||
|
|
82
|
+
($onnetware == 1))
|
|
83
|
+
{
|
|
84
|
+
$s=";";
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
#build up standard classpath
|
|
88
|
+
my $localpath = "$HOME/lib/ant-launcher.jar";
|
|
89
|
+
#set JVM options and Ant arguments, if any
|
|
90
|
+
my @ANT_OPTS=split(" ", $ENV{ANT_OPTS});
|
|
91
|
+
my @ANT_ARGS=split(" ", $ENV{ANT_ARGS});
|
|
92
|
+
|
|
93
|
+
#jikes
|
|
94
|
+
if($ENV{JIKESPATH} ne "")
|
|
95
|
+
{
|
|
96
|
+
push @ANT_OPTS, "-Djikes.class.path=$ENV{JIKESPATH}";
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
#construct arguments to java
|
|
100
|
+
my @ARGS;
|
|
101
|
+
push @ARGS, @ANT_OPTS;
|
|
102
|
+
|
|
103
|
+
my $CYGHOME = "";
|
|
104
|
+
|
|
105
|
+
my $classpath=$ENV{CLASSPATH};
|
|
106
|
+
if ($oncygwin == 1) {
|
|
107
|
+
$localpath = `cygpath --path --windows $localpath`;
|
|
108
|
+
chomp ($localpath);
|
|
109
|
+
if (! $classpath eq "")
|
|
110
|
+
{
|
|
111
|
+
$classpath = `cygpath --path --windows "$classpath"`;
|
|
112
|
+
chomp ($classpath);
|
|
113
|
+
}
|
|
114
|
+
$HOME = `cygpath --path --windows $HOME`;
|
|
115
|
+
chomp ($HOME);
|
|
116
|
+
$CYGHOME = `cygpath --path --windows $ENV{HOME}`;
|
|
117
|
+
chomp ($CYGHOME);
|
|
118
|
+
}
|
|
119
|
+
push @ARGS, "-classpath", "$localpath";
|
|
120
|
+
push @ARGS, "-Dant.home=$HOME";
|
|
121
|
+
if ( ! $CYGHOME eq "" )
|
|
122
|
+
{
|
|
123
|
+
push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\""
|
|
124
|
+
}
|
|
125
|
+
push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS;
|
|
126
|
+
push @ARGS, @ARGV;
|
|
127
|
+
if (! $classpath eq "")
|
|
128
|
+
{
|
|
129
|
+
if ($onnetware == 1)
|
|
130
|
+
{
|
|
131
|
+
# make classpath literally $CLASSPATH
|
|
132
|
+
# this is to avoid pushing us over the 512 character limit
|
|
133
|
+
# even skip the ; - that is already in $localpath
|
|
134
|
+
push @ARGS, "-lib", "\$CLASSPATH";
|
|
135
|
+
}
|
|
136
|
+
else
|
|
137
|
+
{
|
|
138
|
+
push @ARGS, "-lib", "$classpath";
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
print "\n $JAVACMD @ARGS\n\n" if ($debug);
|
|
142
|
+
|
|
143
|
+
my $returnValue = system $JAVACMD, @ARGS;
|
|
144
|
+
if ($returnValue eq 0)
|
|
145
|
+
{
|
|
146
|
+
exit 0;
|
|
147
|
+
}
|
|
148
|
+
else
|
|
149
|
+
{
|
|
150
|
+
# only 0 and 1 are widely recognized as exit values
|
|
151
|
+
# so change the exit value to 1
|
|
152
|
+
exit 1;
|
|
153
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/python
|
|
2
|
+
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
# contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
# this work for additional information regarding copyright ownership.
|
|
5
|
+
# The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
# (the "License"); you may not use this file except in compliance with
|
|
7
|
+
# the License. You may obtain a copy of the License at
|
|
8
|
+
#
|
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
#
|
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
# See the License for the specific language governing permissions and
|
|
15
|
+
# limitations under the License.
|
|
16
|
+
#
|
|
17
|
+
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
runant.py
|
|
21
|
+
|
|
22
|
+
This script is a translation of the runant.pl written by Steve Loughran.
|
|
23
|
+
It runs ant with/out arguments, it should be quite portable (thanks to
|
|
24
|
+
the python os library)
|
|
25
|
+
This script has been tested with Python2.0/Win2K
|
|
26
|
+
|
|
27
|
+
created: 2001-04-11
|
|
28
|
+
author: Pierre Dittgen pierre.dittgen@criltelecom.com
|
|
29
|
+
|
|
30
|
+
Assumptions:
|
|
31
|
+
|
|
32
|
+
- the "java" executable/script is on the command path
|
|
33
|
+
"""
|
|
34
|
+
import os, os.path, string, sys
|
|
35
|
+
|
|
36
|
+
# Change it to 1 to get extra debug information
|
|
37
|
+
debug = 0
|
|
38
|
+
|
|
39
|
+
#######################################################################
|
|
40
|
+
|
|
41
|
+
# If ANT_HOME is not set default to script's parent directory
|
|
42
|
+
if os.environ.has_key('ANT_HOME'):
|
|
43
|
+
ANT_HOME = os.environ['ANT_HOME']
|
|
44
|
+
else:
|
|
45
|
+
ANT_HOME = os.path.dirname(os.path.dirname(os.path.abspath(sys.argv[0])))
|
|
46
|
+
|
|
47
|
+
# set ANT_LIB location
|
|
48
|
+
ANT_LIB = os.path.join(ANT_HOME, 'lib')
|
|
49
|
+
|
|
50
|
+
# set JAVACMD (check variables JAVACMD and JAVA_HOME)
|
|
51
|
+
JAVACMD = None
|
|
52
|
+
if not os.environ.has_key('JAVACMD'):
|
|
53
|
+
if os.environ.has_key('JAVA_HOME'):
|
|
54
|
+
if not os.path.exists(os.environ['JAVA_HOME']):
|
|
55
|
+
print "Warning: JAVA_HOME is not defined correctly."
|
|
56
|
+
else:
|
|
57
|
+
JAVACMD = os.path.join(os.environ['JAVA_HOME'], 'bin', 'java')
|
|
58
|
+
else:
|
|
59
|
+
print "Warning: JAVA_HOME not set."
|
|
60
|
+
else:
|
|
61
|
+
JAVACMD = os.environ['JAVACMD']
|
|
62
|
+
if not JAVACMD:
|
|
63
|
+
JAVACMD = 'java'
|
|
64
|
+
|
|
65
|
+
launcher_jar = os.path.join(ANT_LIB, 'ant-launcher.jar')
|
|
66
|
+
if not os.path.exists(launcher_jar):
|
|
67
|
+
print 'Warning: Unable to locate ant-launcher.jar. Expected to find it in %s' % \
|
|
68
|
+
ANT_LIB
|
|
69
|
+
|
|
70
|
+
# Build up standard classpath (LOCALCLASSPATH)
|
|
71
|
+
LOCALCLASSPATH = launcher_jar
|
|
72
|
+
if os.environ.has_key('LOCALCLASSPATH'):
|
|
73
|
+
LOCALCLASSPATH += os.pathsep + os.environ['LOCALCLASSPATH']
|
|
74
|
+
|
|
75
|
+
ANT_OPTS = ""
|
|
76
|
+
if os.environ.has_key('ANT_OPTS'):
|
|
77
|
+
ANT_OPTS = os.environ['ANT_OPTS']
|
|
78
|
+
|
|
79
|
+
OPTS = ""
|
|
80
|
+
if os.environ.has_key('JIKESPATH'):
|
|
81
|
+
OPTS = '-Djikes.class.path=\"%s\"' % os.environ['JIKESPATH']
|
|
82
|
+
|
|
83
|
+
ANT_ARGS = ""
|
|
84
|
+
if os.environ.has_key('ANT_ARGS'):
|
|
85
|
+
ANT_ARGS = os.environ['ANT_ARGS']
|
|
86
|
+
|
|
87
|
+
CLASSPATH = ""
|
|
88
|
+
if os.environ.has_key('CLASSPATH'):
|
|
89
|
+
CLASSPATH = "-lib " + os.environ['CLASSPATH']
|
|
90
|
+
|
|
91
|
+
# Builds the commandline
|
|
92
|
+
cmdline = ('%s %s -classpath %s -Dant.home=%s %s ' + \
|
|
93
|
+
'org.apache.tools.ant.launch.Launcher %s %s %s') \
|
|
94
|
+
% (JAVACMD, ANT_OPTS, LOCALCLASSPATH, ANT_HOME, OPTS, ANT_ARGS, \
|
|
95
|
+
CLASSPATH, string.join(sys.argv[1:], ' '))
|
|
96
|
+
|
|
97
|
+
if debug:
|
|
98
|
+
print '\n%s\n\n' % (cmdline)
|
|
99
|
+
sys.stdout.flush()
|
|
100
|
+
|
|
101
|
+
# Run the biniou!
|
|
102
|
+
os.system(cmdline)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Licensed to the Apache Software Foundation (ASF) under one or more
|
|
3
|
+
contributor license agreements. See the NOTICE file distributed with
|
|
4
|
+
this work for additional information regarding copyright ownership.
|
|
5
|
+
The ASF licenses this file to You under the Apache License, Version 2.0
|
|
6
|
+
(the "License"); you may not use this file except in compliance with
|
|
7
|
+
the License. You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
|
|
17
|
+
Run RC file, name is in the first arg, second arg is either PATH
|
|
18
|
+
ENV or -r or nothing
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
parse arg name path rest
|
|
22
|
+
|
|
23
|
+
if name = '' then do
|
|
24
|
+
say 'RC file name is missing'
|
|
25
|
+
exit 1
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
if rest \= '' then do
|
|
29
|
+
say 'Too many parameters'
|
|
30
|
+
exit 1
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
call runit name path
|
|
34
|
+
exit 0
|
|
35
|
+
|
|
36
|
+
runit: procedure
|
|
37
|
+
parse arg name path dir
|
|
38
|
+
|
|
39
|
+
if path \= '' & path \= '-r' then do
|
|
40
|
+
dir = value(translate(path),,'OS2ENVIRONMENT')
|
|
41
|
+
if dir = '' then return
|
|
42
|
+
dir = translate(dir, '\', '/') /* change UNIX-like path to OS/2 */
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
if dir = '' then dir = directory()
|
|
46
|
+
|
|
47
|
+
if path = '-r' then do /* recursive call */
|
|
48
|
+
subdir = filespec('path', dir)
|
|
49
|
+
if subdir \= '\' then do
|
|
50
|
+
subdir = left(subdir, length(subdir)-1)
|
|
51
|
+
call runit name path filespec('drive', dir) || subdir
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
/* Look for the file and run it */
|
|
56
|
+
if right(dir, 1) \= '\' then dir = dir || '\'
|
|
57
|
+
rcfile = stream(dir || name, 'c', 'query exists')
|
|
58
|
+
if rcfile \= '' then interpret 'call "' || rcfile || '"'
|
|
59
|
+
|
|
60
|
+
return
|