Created
June 12, 2012 00:51
-
-
Save mountain/2913723 to your computer and use it in GitHub Desktop.
Shell wrapper for node.js antinode static server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# A wrapper for runner | |
# | |
CUR="${BASH_SOURCE[0]}"; | |
if([ -h "${CUR}" ]) then | |
while([ -h "${CUR}" ]) do CUR=`readlink -m "${CUR}"`; done | |
fi | |
pushd . > /dev/null | |
cd `dirname ${CUR}` > /dev/null | |
CUR=`pwd`; | |
popd > /dev/null | |
exec "node" "${CUR}/server.js" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment