Add a generic script to run the right Node binary

(imported from commit cf187323786cf1ee576ec70b6f7db4cbf61d6911)
This commit is contained in:
Keegan McAllister 2013-02-16 05:10:08 -05:00
parent 5f33298bf4
commit 02ce209b5e
3 changed files with 12 additions and 12 deletions

View File

@ -11,7 +11,7 @@ fi
# Make the output of the tools red
echo -en '\e[0;31m'
if ! "$SCRIPT_DIR"/jslint/check-all; then
if ! "$SCRIPT_DIR"/node "$SCRIPT_DIR"/jslint/check-all.js; then
EXITCODE=1;
fi

View File

@ -1,11 +0,0 @@
#!/bin/sh -e
if which nodejs >/dev/null; then
# Name used by Debian etc.
NODE=nodejs
else
# Name used by upstream
NODE=node
fi
$NODE "$0".js

11
tools/node Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash -e
# Wrapper for node which finds the right binary.
if which nodejs >/dev/null; then
# Name used by Debian etc.
exec nodejs "$@"
else
# Name used by upstream
exec node "$@"
fi