Skip to content

Commit

Permalink
Updating run.sh and install.sh (#4033)
Browse files Browse the repository at this point in the history
* Update run.sh

* Update setup.sh

* Update setup.sh

* Update setup.sh
  • Loading branch information
simonsmh authored and elicwhite committed Aug 16, 2016
1 parent ad32f1d commit 6fa57fe
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 3 deletions.
9 changes: 9 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ filename="./configs/config.json"
fi
cd $pokebotpath
source bin/activate
git fetch -a
if [ "1" == $(git branch -vv |grep -c "* dev") ] && [ $(git log --pretty=format:"%h" -1) != $(git log --pretty=format:"%h" -1 origin/dev) ]
then
echo "Branch dev hav an update. Run ./setup.sh -u to update."

This comment has been minimized.

Copy link
@k4n30

k4n30 Aug 16, 2016

Contributor

hav?

This comment has been minimized.

Copy link
@bruvv

bruvv Aug 16, 2016

Contributor

Yes please fix this @simonsmh

elif [ "1" == $(git branch -vv |grep -c "* master") ] && [ $(git log --pretty=format:"%h" -1) != $(git log --pretty=format:"%h" -1 origin/master) ]
then
echo "Branch master hav an update. Run ./setup.sh -u to update."

This comment has been minimized.

Copy link
@k4n30

k4n30 Aug 16, 2016

Contributor

hav?

fi
sleep 2
if [ ! -f "$filename" ]; then
echo "There's no "$filename" file. Please use ./setup.sh -c to creat one."
fi
Expand Down
25 changes: 22 additions & 3 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,17 @@ then
echo "You are on Mac os"
sudo brew update
sudo brew install --devel protobuf
elif [ $(uname -s) == CYGWIN* ]
then
echo "You are on Cygwin"
if [ !-x "$(command -v apt-cyg)" ]
then
wget http://apt-cyg.googlecode.com/svn/trunk/apt-cyg
chmod +x apt-cyg
mv apt-cyg /usr/local/bin/
fi
apt-cyg install gcc-core make
easy_install pip
elif [ -x "$(command -v apt-get)" ]
then
echo "You are on Debian/Ubuntu"
Expand Down Expand Up @@ -91,7 +102,7 @@ echo "Please check if you have python pip gcc make installed on your device."
echo "Wait 5 seconds to continue or Use ctrl+c to interrupt this shell."
sleep 5
fi
sudo pip install virtualenv
easy_install virtualenv
Pokebotreset
Pokebotupdate
Pokebotencrypt
Expand All @@ -101,8 +112,16 @@ Pokebotconfig

function Pokebotreset () {
cd $pokebotpath
git fetch --all
git fetch -a
if [ "1" == $(git branch -vv |grep -c "* dev") ]
then
echo "Branch dev resetting."
git reset --hard origin/dev
elif [ "1" == $(git branch -vv |grep -c "* master") ]
then
echo "Branch master resetting."
git reset --hard origin/master
fi
if [ -x "$(command -v python2)" ]
then
virtualenv -p python2 .
Expand All @@ -118,7 +137,7 @@ echo " -i,--install. Install PokemonGo-Bot."
echo " -b,--backup. Backup config files."
echo " -c,--config. Easy config generator."
echo " -e,--encrypt. Make encrypt.so."
echo " -r,--reset. Force sync dev branch."
echo " -r,--reset. Force sync source branch."
echo " -u,--update. Command git pull to update."
}

Expand Down

0 comments on commit 6fa57fe

Please sign in to comment.