node-which 308 Bytes
Newer Older
Rosanny Sihombing's avatar
Rosanny Sihombing committed
1
2
3
4
5
6
7
8
#!/bin/sh
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")

case `uname` in
    *CYGWIN*|*MINGW*|*MSYS*) basedir=`cygpath -w "$basedir"`;;
esac

if [ -x "$basedir/node" ]; then
9
  exec "$basedir/node"  "$basedir/../which/bin/node-which" "$@"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
10
else 
11
  exec node  "$basedir/../which/bin/node-which" "$@"
Rosanny Sihombing's avatar
Rosanny Sihombing committed
12
fi