Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
executable file 55 lines (46 sloc) 0.82 kB
#!/usr/bin/perl
use strict;
use warnings;
my @opts;
while( $_ = $ARGV[0], /^-/ ) {
shift;
last if /^--$/;
push @opts, $_;
}
my $platform = shift;
use Cwd;
my $top = getcwd;
my $fudge;
TOP:
while ($top) {
for ("$top/fudge",
"$top/spec/fudge",
"$top/t/spec/fudge",
"$top/perl6/t/spec/fudge",
"$top/languages/perl6/t/spec/fudge",
) {
if (-f $_) {
$fudge = $_;
last TOP;
}
}
$top =~ s!(.*)/(.*)!!;
}
if (not $fudge) {
for (split(/[:;]/, $ENV{PATH})) {
if (-f "$_/fudge") {
$fudge = "$_/fudge";
last;
}
}
}
print join(' ',
map {
my $pick;
if ( $_ !~ m/\.$platform$/ ) {
my $cmd = "$^X \"$fudge\" @opts $platform $_";
chomp( $pick = `$cmd` );
}
defined $pick ? $pick : ();
} @ARGV
), "\n";
Jump to Line
Something went wrong with that request. Please try again.