From 78eb27a568d6c3b440efa9a2d24d0f92bf08b100 Mon Sep 17 00:00:00 2001 From: Thanh TRAN Date: Sat, 30 Jul 2016 20:20:14 +0200 Subject: [PATCH] Possibility to set another config with run script --- run.sh | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/run.sh b/run.sh index de2a09699b..ec95acb3e3 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,18 @@ #!/usr/bin/env bash -# Assumes the config file is created and named config.json # Starts PokemonGo-Bot -eval "python pokecli.py --config ./configs/config.json" \ No newline at end of file +config="" + +if [ ! -z $1 ]; then + config=$1 +else + config="./configs/config.json" + if [ ! -f ${config} ]; then + echo -e "There's no ./configs/config.json file" + echo -e "Please create one or use another config file" + echo -e "./run.sh [path/to/config/file]" + exit 1 + fi +fi + +python pokecli.py --config ${config}