diff --git a/install.sh b/install.sh index 32cc1e1124..1e7415ed30 100755 --- a/install.sh +++ b/install.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -pokebotpath=$(pwd) +pokebotpath=$(cd "$(dirname "$0")"; pwd) cd $pokebotpath if [ -f /etc/debian_version ] then @@ -17,7 +17,9 @@ echo "You are on Mac os" sudo brew update sudo brew install --devel protobuf else -echo "Nothing happend." +echo "Please check if you have python pip protobuf gcc make installed on your device." +echo "Wait 5 seconds to continue or Use ctrl+c to interrupt this shell." +sleep 5 fi pip install virtualenv cd $pokebotpath @@ -36,7 +38,7 @@ mv libencrypt.so $pokebotpath/encrypt.so cd ../.. rm -rf pgoencrypt.tar.gz rm -rf pgoencrypt -echo "Install complete." +echo "Install complete. Starting to generate config.json." cd $pokebotpath read -p "1.google 2.ptc " auth @@ -58,5 +60,5 @@ sed -i "s/YOUR_USERNAME/$username/g" configs/config.json sed -i "s/YOUR_PASSWORD/$password/g" configs/config.json sed -i "s/SOME_LOCATION/$location/g" configs/config.json sed -i "s/GOOGLE_MAPS_API_KEY/$gmapkey/g" configs/config.json -echo "Edit configs/config.json to modify any other config. Use run.sh to run." +echo "Edit configs/config.json to modify any other config. Use run.sh ./configs/config.json to run." exit 0 diff --git a/run.sh b/run.sh index d8406697e7..4c93cda234 100755 --- a/run.sh +++ b/run.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -pokebotpath=$(pwd) +pokebotpath=$(cd "$(dirname "$0")"; pwd) filename="" if [ ! -z $1 ]; then filename=$1 diff --git a/setup.sh b/setup.sh index 07589917e9..84baef623a 100755 --- a/setup.sh +++ b/setup.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -pokebotpath=$(pwd) -backuppath=$(pwd)"/backup" +pokebotpath=$(cd "$(dirname "$0")"; pwd) +backuppath=$pokebotpath"/backup" function Pokebotupdate () { cd $pokebotpath