1
0
mirror of git://projects.qi-hardware.com/eda-tools.git synced 2024-11-27 08:20:36 +02:00
eda-tools/old-boom/boom

27 lines
387 B
Plaintext
Raw Normal View History

2012-05-02 05:09:24 +03:00
#!/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: $!";