mirror of
https://github.com/notwa/rc
synced 2024-11-05 06:29:02 -08:00
support cosmopolitan perl in shelly
This commit is contained in:
parent
ba2982b880
commit
07c2d3809c
1 changed files with 7 additions and 1 deletions
|
@ -12,9 +12,15 @@ my @shells = <zsh osh fish ion bash ash busybox ksh tcsh csh rc dash>;
|
||||||
|
|
||||||
for my $s (@shells) {
|
for my $s (@shells) {
|
||||||
for my $p (@PATH) {
|
for my $p (@PATH) {
|
||||||
|
#print STDERR "path: $p\n";
|
||||||
my $fp = File::Spec->join($p, $s);
|
my $fp = File::Spec->join($p, $s);
|
||||||
my @argv = $s eq "busybox" ? ("sh", "-i") : ($s, "-i");
|
my @argv = $s eq "busybox" ? ("sh", "-i") : ($s, "-i");
|
||||||
exec {$fp} @argv if -f $fp and -e "$fp";
|
if (-d "/C/") {
|
||||||
|
# probably Windows.
|
||||||
|
exec {"$fp.exe"} @argv if -f "$fp.exe" and -e "$fp.exe";
|
||||||
|
} else {
|
||||||
|
exec {$fp} @argv if -f $fp and -e $fp;
|
||||||
|
}
|
||||||
#print STDERR "fail: $fp\n";
|
#print STDERR "fail: $fp\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue