Mercurial > MadButterfly
annotate nodejs/run.sh @ 1094:613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sat, 04 Dec 2010 12:40:04 +0800 |
parents | 652199a55802 |
children | bced6fe39856 |
rev | line source |
---|---|
939
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
1 #!/bin/sh |
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
2 |
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
3 ABS=`realpath $0` |
1094
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
4 if [ -z "$SRCDIR" ]; then |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
5 SRCDIR=`dirname $ABS`/.. |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
6 fi |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
7 if [ -z "$BUILDDIR" ]; then |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
8 BUILDDIR=`dirname $ABS`/.. |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
9 fi |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
10 |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
11 NODE_PATH=${BUILDDIR}/nodejs/objs/default:${SRCDIR}/nodejs:$NODE_PATH |
939
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
12 export NODE_PATH |
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
13 |
1094
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
14 LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${BUILDDIR}/src/.libs/ |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
15 export LD_LIBRARY_PATH |
613a7caa9bd6
Dynamic link libmbfly.so against nodejs plugin
Thinker K.F. Li <thinker@codemud.net>
parents:
940
diff
changeset
|
16 |
939
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
17 DIR=`dirname $1` |
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
18 FNAME=`basename $1` |
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
19 |
a74b4d986a91
Move examples for nodejs into nodejs/examples/ sub-directories.
Thinker K.F. Li <thinker@codemud.net>
parents:
diff
changeset
|
20 cd $DIR; node $FNAME |