You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Steve Loughran <st...@iseran.com> on 2000/08/25 00:01:58 UTC

[PATCH] runant.pl

This is a simple Perl script to supplement the existing ant invocation
scripts. It is pretty much a translation of the DOS batch file, with an
internal debug flag to trace out what is happening when things go wrong.

It is actually a staging release on the way to a cgi-bin script that
triggers some server side build tasks with the XML output fed back to the
browser. But in its present incarnation it scould be a handy starting point
for running ant on those boxes that have Java & perl but are not unix/PC.

As usual I have had to work around the issues of how directories and
classpath entries are separated. What I have done works on linux and win32,
but will inevitably need some minor changes to work on other boxes.

-Steve


RE: [PATCH] runant.pl

Posted by Conor MacNeill <co...@m64.com>.
Michael,

I have now committed the runant.pl script so feel free to submit any
patches.

Conor


> -----Original Message-----
> From: Michael McCallum [mailto:gholam@xtra.co.nz]
> Sent: Saturday, 26 August 2000 11:48
> To: ant-dev@jakarta.apache.org
> Subject: RE: [PATCH] runant.pl
>
>
> On Sat, 26 Aug 2000, you wrote:
> > How about I commit the original submission and then you can
> send a patch for
> > it?
> that would make the most sense :)
>
> Michael
>


RE: [PATCH] runant.pl

Posted by Michael McCallum <gh...@xtra.co.nz>.
On Sat, 26 Aug 2000, you wrote:
> How about I commit the original submission and then you can send a patch for
> it?
that would make the most sense :)

Michael

RE: [PATCH] runant.pl

Posted by Conor MacNeill <co...@m64.com>.
How about I commit the original submission and then you can send a patch for
it?

Conor


> -----Original Message-----
> From: Michael McCallum [mailto:michael@spinsoftware.co.nz]
> Sent: Friday, 25 August 2000 9:19
> To: ant-dev@jakarta.apache.org
> Subject: Re: [PATCH] runant.pl
>
>
> the perl one liner would be
>
> <this>
>   #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";
>     }
> <becomes>
>   $localpath .= "$s" . join( "$s", glob( $jarpattern ) );
>
>  but for readabiliy you probably want...
>
>    my $jarpattern = "$HOME/lib/*.jar";
>    my @jarfiles = glob( $jarpattern );
>    $localpath .= "$s" . join( "$s", glob( @jarfiles ) );
>
> p.s.
>
> you should make you env safe...run with a -T -w tags eg
> /usr/bin/perl -T -w
> admittedly you get heaps more warning messages but it stops you
> making simples mistakes
> you might overlook.
> Although you will have to resolve the insecure dependency using the glob.
> If you like I will submit a safer version later but have to work now :)
>
> Michael
>
> also to make it portable use /usr/bin/perl not /usr/local/perl
> most installations will have it here.
> --- BEGIN GEEK CODE BLOCK ---
> Version 3.12
> GCS d+(-) s:- a-- C++(+++)$ UL++++(H)(S)$ P+++$ L+++$>++++
> E--- W++ N++ o++ K? !w() O? !M V? PS+ PE+++ Y+ t+ 5++ X++
> R(+) !tv b++(++++) D++ G>++ e++> h--()(*) r+ y+()
> --- END GEEK CODE BLOCK ---
>


Re: [PATCH] runant.pl

Posted by Michael McCallum <mi...@spinsoftware.co.nz>.
the perl one liner would be

<this>
  #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";
    }
<becomes>
  $localpath .= "$s" . join( "$s", glob( $jarpattern ) );

 but for readabiliy you probably want...

   my $jarpattern = "$HOME/lib/*.jar";  
   my @jarfiles = glob( $jarpattern );
   $localpath .= "$s" . join( "$s", glob( @jarfiles ) );

p.s.

you should make you env safe...run with a -T -w tags eg
/usr/bin/perl -T -w
admittedly you get heaps more warning messages but it stops you making simples mistakes 
you might overlook.
Although you will have to resolve the insecure dependency using the glob. 
If you like I will submit a safer version later but have to work now :)

Michael

also to make it portable use /usr/bin/perl not /usr/local/perl most installations will have it here.
--- BEGIN GEEK CODE BLOCK ---
Version 3.12
GCS d+(-) s:- a-- C++(+++)$ UL++++(H)(S)$ P+++$ L+++$>++++
E--- W++ N++ o++ K? !w() O? !M V? PS+ PE+++ Y+ t+ 5++ X++ 
R(+) !tv b++(++++) D++ G>++ e++> h--()(*) r+ y+()
--- END GEEK CODE BLOCK ---