Remove optimist dependency. Add help text with options

This commit is contained in:
Jordan 2012-02-16 18:26:06 -05:00
parent 102318497d
commit f409914ff2
6 changed files with 68 additions and 12 deletions

View file

@ -44,8 +44,7 @@ fi
settings="settings.json"
a='';
for arg in $*; do
if [ "$a" = "--settings" ]; then settings=$arg; fi
if [ "$a" = "-s" ]; then settings=$arg; fi
if [ "$a" = "--settings" ] || [ "$a" = "-s" ]; then settings=$arg; fi
a=$arg
done
#Does a $settings exist? if no copy the template

View file

@ -20,10 +20,18 @@ if [ "$(id -u)" -eq 0 ]; then
fi
fi
prep=1
#If merely looking for help, don't prep the environment
for arg in $*; do
if [ "$arg" = "--help" ] || [ "$arg" = "-h" ]; then prep=0; fi
done
#prepare the enviroment
bin/installDeps.sh $* || exit 1
if [ $prep -eq 1 ]; then
bin/installDeps.sh $* || exit 1
echo "start..."
fi
#Move to the node folder and start
echo "start..."
cd "node"
node server.js $*