Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.686 kb
#!/usr/bin/perl
# Copyright (C) 2013, The Perl Foundation.
use strict;
use warnings;
use 5.008;
use File::Spec;
my ($moar) = @ARGV;
if ($^O eq 'MSWin32') {
my $install_to = 'nqp-m.bat';
open my $fh, ">", $install_to
or die "Could not open $install_to: $!";
print $fh '@ "' . $moar . '" nqp.moarvm %*' . "\n";
close $fh
or die "Could not close $install_to: $!";
}
else {
my $install_to = 'nqp-m';
open my $fh, ">", $install_to
or die "Could not open $install_to: $!";
printf $fh <<'EOS', $moar;
#!/bin/sh
exec %s nqp.moarvm "$@"
EOS
close $fh
or die "Could not close $install_to: $!";
chmod 0755, $install_to;
}
Jump to Line
Something went wrong with that request. Please try again.