mirror of
git://projects.qi-hardware.com/eda-tools.git
synced 2024-11-05 17:35:20 +02:00
27 lines
387 B
Perl
Executable File
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: $!";
|