view nodejs/run.sh @ 939:a74b4d986a91

Move examples for nodejs into nodejs/examples/ sub-directories. See INSTALL.txt. Use nodejs/examples/run.sh to run examples. For example, cd nodejs/examples; ./run.sh examples/testsvg/testsvg.js
author Thinker K.F. Li <thinker@codemud.net>
date Fri, 12 Nov 2010 17:39:04 +0800
parents
children 652199a55802
line wrap: on
line source

#!/bin/sh

ABS=`realpath $0`
BASE=`dirname $ABS`
NODE_PATH=$BASE:$NODE_PATH
export NODE_PATH

DIR=`dirname $1`
FNAME=`basename $1`

cd $DIR; node $FNAME