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}