1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-16 21:19:43 +02:00
eda-tools/old-boom/boom
2012-05-01 23:09:24 -03:00

27 lines
387 B
Perl
Executable File

#!/usr/bin/perl
sub usage
{
print STDERR "usage: $0 command [arg ...]\n";
exit(1);
}
&usage unless @ARGV;
($d = $0) =~ s|/[^/]*$||;
if ($d eq "") {
$p = "/";
} elsif ($d =~ /^\//) {
$p = "$d";
} else {
chomp($cwd = `pwd`);
$p = "$cwd/$d";
}
$cmd = shift @ARGV;
$cmd = "$p/$cmd" unless $cmd =~ m|/|;
exec("perl", "-I", $p, $cmd, @ARGV);
die "exec perl: $!";