From 7c5360410059e697c597f36a786ec06bf9e45583 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Sun, 6 Nov 2016 16:48:54 +0800 Subject: [PATCH] add help message --- bin/entrypoint.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index 8c603f28..1c1df42a 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -137,6 +137,17 @@ function wechaty::runBot() { return "$ret" } +function wechaty::help() { + echo < + + 1. mybot.js: a JavaScript program for your bot. will run by node v6 + 2. mybot.ts: a TypeScript program for your bot. will run by ts-node + 3. command: demo, test, doctor + +HELP +} + function main() { wechaty::banner figlet Connecting @@ -175,6 +186,14 @@ function main() { npm "$@" || ret=$? ;; + '') + if [ -n "$WECHATY_TOKEN" ]; then + npm start + else + wechaty::help + fi + ;; + # # 4. Default to execute npm run ... # -- GitLab