Support calling bin/resin from within bin/

This commit is contained in:
Juan Cruz Viotti 2015-02-12 09:02:11 -04:00
parent 29f359da68
commit a84c3d5c9f

View File

@ -45,4 +45,9 @@ if [ ! -x $NODE_PATH ]; then
fi
fi
$NODE_PATH "./lib/resin.js" "$@"
# Support calling bin/resin from within bin/
if [ `dirname $0` == '.' ]; then
$NODE_PATH "../lib/resin.js" "$@"
else
$NODE_PATH "./lib/resin.js" "$@"
fi