view nodejs/run.sh @ 1338:d0e6f350b3fd

Clear change log to prevent from undo/redo. - commit the transaction after changing DOM-tree. - prevent SPObject document from adding changes into the log of undo/redo. - If a changes is not in the log of undo/redo, it would not be redo.
author Thinker K.F. Li <thinker@codemud.net>
date Sat, 05 Feb 2011 18:08:57 +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