Skip to content

Commit

Permalink
Build a probe for node/nodejs. Not used yet
Browse files Browse the repository at this point in the history
  • Loading branch information
moritz committed Feb 14, 2015
1 parent 8fffdb7 commit 6aa5d8d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/lib/NQP/Configure.pm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ our @EXPORT_OK = qw(sorry slurp system_or_die
git_checkout
verify_install gen_moar
github_url
probe_node
gen_nqp gen_parrot);

our $exe = $^O eq 'MSWin32' ? '.exe' : '';
Expand Down Expand Up @@ -498,5 +499,17 @@ sub github_url {
}
}

sub probe_node {
# Debian ships a 'node' binary that is related to amateur radio.
# the javascript thingy is called 'nodejs' there
for my $binary (qw/nodejs node/) {
my $version_str = qx/$binary -v 2>&1/;
if ($version_str =~ /^v\d/) {
return $binary;
}
}
return;
}


1;

0 comments on commit 6aa5d8d

Please sign in to comment.