Skip to content

Commit

Permalink
Only need to check for is-win once
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Feb 18, 2015
1 parent 66de7b2 commit 12c7e5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/CompUnitRepo/Local/Installation.pm
Expand Up @@ -106,14 +106,15 @@ sub MAIN(:$name, :$auth, :$ver, *@pos, *%named) {
}
else {
if $file ~~ /^bin<[\\\/]>/ {
my $is-win := $*DISTRO.is-win;
mkdir "$path/bin" unless "$path/bin".IO.d;
my $basename = $file.IO.basename;
my $withoutext = $basename;
$withoutext.=subst(/\.[exe|bat]$/, '');
for '', < -p -j -m > -> $be {
"$path/bin/$withoutext$be".IO.spurt:
$perl_wrapper.subst('#name#', $basename, :g).subst('#perl#', "perl6$be");
if $*DISTRO.is-win {
if $is-win {
"$path/bin/$withoutext$be.bat".IO.spurt:
$windows_wrapper.subst('#perl#', "perl6$be");
}
Expand Down

0 comments on commit 12c7e5c

Please sign in to comment.