Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Run-Loop #3143

Merged
merged 4 commits into from
Aug 9, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions run_loop.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash

# Starts PokemonGo-Bot
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
while [ true ]
do
python pokecli.py --config ${config}
echo "##################################"
echo "##Exit two times to end the loop##"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change 'Exit' to [Ctl+C] would be better?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sounds good

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't you edit run.sh with these contents?

Copy link
Contributor Author

@devn0ll devn0ll Aug 8, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure if everyone wants to run their bot forever ? but i can do that

echo "##################################"
sleep "10"
done