PokemonGo-Bot icon indicating copy to clipboard operation
PokemonGo-Bot copied to clipboard

setup.sh returns : ./setup.sh: 6: ./setup.sh: Syntax error: "(" unexpected

Open ultrafunkamsterdam opened this issue 10 years ago • 9 comments

What i tried to resolve:

I removed entire folder, cloned a new one. Problem still exists. Running with root.

ultrafunkamsterdam avatar Aug 24 '16 18:08 ultrafunkamsterdam

same for me

Billy2Kid avatar Aug 24 '16 18:08 Billy2Kid

./setup.sh -i

-i,--install. Install PokemonGo-Bot. -b,--backup. Backup config files. -c,--config. Easy config generator. -e,--encrypt. Make encrypt.so. -r,--reset. Force sync source branch. -u,--update. Command git pull to update.

maxprzemo avatar Aug 24 '16 18:08 maxprzemo

@maxprzemo Thanks! but...Dafuq? Now it works.. so don't use sudo sh ./setup.sh -i but just ./setup.sh -i ? What's the difference?

ultrafunkamsterdam avatar Aug 24 '16 19:08 ultrafunkamsterdam

@ultrafunkamsterdam Header in setup.sh tells us that this file should be executed with bash, not sh. When you use ./setup.sh it runs according to its header. Alternatively you can run bash setup.sh. And also there is no reason to execute it with sudo. Otherwise you will have to run your bot as root, what is not a good idea.

cmezh avatar Aug 24 '16 19:08 cmezh

Thanks for your answer. If i don't use sudo -H the first line returned is error: cannot open .git/FETCH_HEAD: Permission denied

Also, 2 days ago, the console output was nice and clean.

now i get 100's of {u'pokemon_id': 1, u'longitude': 120.978266222113, u'expiration_timestamp_ms': -1, u'latitude': 14.593648061369574, u'spawn_point_id': u'3397ca19bab', u'encounter_id': 16039666005064951741L}

Is there some switch to get only the 'walking to... ' and 'spearow appeared' messages?

ultrafunkamsterdam avatar Aug 24 '16 19:08 ultrafunkamsterdam

@ultrafunkamsterdam "Permission denied" is this case may happen if you ran setup.sh (or git manually) with sudo or as root user. Looks like you've done this when you ran setup.sh for first time. You can fix it with chown: sudo chown -R user:group . Substitute user with your system username and group with your system groupname. Usually groupname is the same as username. For example for me it is sudo chown -R cmezh:cmezh . About spamming messages: it was fixed in latest dev commits.

cmezh avatar Aug 24 '16 20:08 cmezh

Yes, i know Chown, but thought it had too do with packages on other locations too. I will try your method. Thanks!

ultrafunkamsterdam avatar Aug 24 '16 20:08 ultrafunkamsterdam

You welcome, good luck!

cmezh avatar Aug 24 '16 20:08 cmezh

@ultrafunkamsterdam Problem resolved?

mjmadsen avatar Aug 25 '16 05:08 mjmadsen