view nodejs/run.sh @ 1239:447cd3359cf2

Fix bug of mal-structured dup group - When a user changes tween type of a tween, the structure of dup group may not satisfy the requirement of new type. - It causes unexpected behavior. - It is fixed by checking structure and remove mal-structured ones.
author Thinker K.F. Li <thinker@codemud.net>
date Mon, 10 Jan 2011 11:45:13 +0800
parents bced6fe39856
children
line wrap: on
line source

#!/bin/sh

ABS=`realpath $0`
if [ -z "$SRCDIR" ]; then
    SRCDIR=`dirname $ABS`/..
fi
if [ -z "$BUILDDIR" ]; then
    BUILDDIR=`dirname $ABS`/..
fi

NODE_PATH=${BUILDDIR}/nodejs/objs/default:${SRCDIR}/nodejs:$NODE_PATH
export NODE_PATH

LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILDDIR}/src/.libs/
export LD_LIBRARY_PATH

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

if [ -z "$DEBUG" ]; then
    cd $DIR; node $FNAME
else
    # DEBUG
    cd $DIR; gdb -args node $FNAME
fi