From cac8fe79990798cbee8272651da6cbe944bf0067 Mon Sep 17 00:00:00 2001 From: Yago Date: Tue, 7 Apr 2015 00:27:13 +0200 Subject: [PATCH] cd $THIS_DIR --- launch.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/launch.sh b/launch.sh index bc91e02..bbd251e 100755 --- a/launch.sh +++ b/launch.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash THIS_DIR=$(cd $(dirname $0); pwd) +cd $THIS_DIR update() { git pull @@ -60,13 +61,13 @@ if [ "$1" = "install" ]; then elif [ "$1" = "update" ]; then update else - if [ ! -f $THIS_DIR/tg/telegram.h ]; then + if [ ! -f ./tg/telegram.h ]; then echo "tg not found" echo "Run $0 install" exit 1 fi - if [ ! -f $THIS_DIR/tg/bin/telegram-cli ]; then + if [ ! -f ./tg/bin/telegram-cli ]; then echo "tg binary not found" echo "Run $0 install" exit 1 @@ -75,5 +76,5 @@ else PREFIX="$THIS_DIR/.luarocks" export LUA_CPATH=";;${PREFIX}/lib/lua/5.2/?.so" export LUA_PATH=";;${PREFIX}/share/lua/5.2/?.lua;${PREFIX}/share/lua/5.2/?/init.lua" - $THIS_DIR/tg/bin/telegram-cli -k $THIS_DIR/tg/tg-server.pub -s $THIS_DIR/bot/bot.lua -l 1 + ./tg/bin/telegram-cli -k ./tg/tg-server.pub -s ./bot/bot.lua -l 1 fi