Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
import and adapot gen-moar-runner.pl from nqp
pretty pointless so far, because we do not get that far in the compilation.
- Loading branch information
Showing
2 changed files
with
33 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| #!/usr/bin/perl | ||
| # Copyright (C) 2013, The Perl Foundation. | ||
|
|
||
| use strict; | ||
| use warnings; | ||
| use 5.008; | ||
| use File::Spec; | ||
|
|
||
| my ($moar, $libpath) = @ARGV; | ||
|
|
||
| if ($^O eq 'MSWin32') { | ||
| my $install_to = 'perl6-m.bat'; | ||
| open my $fh, ">", $install_to | ||
| or die "Could not open $install_to: $!"; | ||
| printf q[@ "%s" --libpath="%s" perl6.moarvm %*] . "\n", | ||
| $libpath, $moar; | ||
| close $fh | ||
| or die "Could not close $install_to: $!"; | ||
| } | ||
| else { | ||
| my $install_to = 'perl6-m'; | ||
| open my $fh, ">", $install_to | ||
| or die "Could not open $install_to: $!"; | ||
| printf $fh <<'EOS', $moar, $libpath; | ||
| #!/bin/sh | ||
| exec %s --libpath=%s perl6.moarvm "$@" | ||
| EOS | ||
| close $fh | ||
| or die "Could not close $install_to: $!"; | ||
| chmod 0755, $install_to; | ||
| } |