diff --git a/install.sh b/install.sh new file mode 100755 index 0000000000..c11992bb0c --- /dev/null +++ b/install.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +# Setup Python virtualenv +echo "Setting up Python virtualenv..." +eval "virtualenv ." +eval "source bin/activate" +echo "Python virtualenv setup successfully." + +# Install pip requirements +echo "Installing pip requirements..." +eval "pip install -r requirements.txt" +echo "Installed pip requirements." +echo "Installing and updating git submodules..." + +# Install git submodules +eval "cd ./web && git submodule init && cd .." +eval "git submodule update" +echo "Done." +echo "Please create and setup configs/config.json. Then, run 'python pokecli.py --config ./configs/config.json' or './run.sh' on Mac/Linux" \ No newline at end of file diff --git a/pokecli.py b/pokecli.py index 9a22a9f819..a3b3b1b452 100755 --- a/pokecli.py +++ b/pokecli.py @@ -160,8 +160,12 @@ def init_config(): for key in config.__dict__: if key in load: config.__dict__[key] = load[key] - config.catch = load['catch'] - config.release = load['release'] + + if 'catch' in load: + config.catch = load['catch'] + + if 'release' in load: + config.release = load['release'] if config.auth_service not in ['ptc', 'google']: logging.error("Invalid Auth service specified! ('ptc' or 'google')") diff --git a/run.sh b/run.sh new file mode 100755 index 0000000000..de2a09699b --- /dev/null +++ b/run.sh @@ -0,0 +1,5 @@ +#!/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