From abb3645d5478a975ec6b5eb2ce7b5b1bd25eb725 Mon Sep 17 00:00:00 2001 From: "Zhuohuan LI (CARPE DIEM)" Date: Mon, 31 Oct 2016 14:18:28 +0000 Subject: [PATCH] better to find bot.ts file --- bin/entrypoint.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh index 36fa9c73..5cccb456 100755 --- a/bin/entrypoint.sh +++ b/bin/entrypoint.sh @@ -32,14 +32,16 @@ fi if [[ "$1" == *.ts || "$1" == *.js ]]; then - appFile="/app/$1" + botFile="$1" + botFilePath="/bot/$1" + shift - if [ -f "$appFile" ]; then - echo "Executing ts-node /app/$@" - exec ts-node "/app/$@" + if [ -f "$botFilePath" ]; then + echo "Executing ts-node $botFilePath $@" + exec ts-node "$botFilePath" $@ exit $? else - echo "ERROR: can not found app file: $appfile" + echo "ERROR: can not found bot file: $botFile" exit -1 fi -- GitLab