JarateKing / CleanTF2plus

Clean TF2's sequel
MIT License
118 stars 14 forks source link

unexpected operator error when selecting any option in the .sh file #26

Closed Bread1009 closed 1 year ago

Bread1009 commented 1 year ago

i run linux (ubuntu) and when i saw this i thought i would give it a try. put it in the specified file path but when it asks the Y/N questions, no matter what i put it just gives the error above.

what i get:

./generate.sh would you like flat materials? Y/N/HELP Y ./generate.sh: 217: [: Y: unexpected operator ./generate.sh: 220: [: Y: unexpected operator ./generate.sh: 222: [: Y: unexpected operator invalid input would you like flat materials? Y/N/HELP

please help, thanks!

Pyogenics commented 1 year ago

What version of ubuntu and shell are you using? Have you modified the script in anyway?

Pyogenics commented 1 year ago

A potential fix maybe to change the first line from #!/bin/sh to #!/bin/bash, since ubuntu seems to use a different shell for sh instead of bash?

Bread1009 commented 1 year ago

looks like switching the sh to bash worked! thank you!

Pyogenics commented 1 year ago

I will create a PR an replace this in the code to prevent future issues, thanks for exposing this issue.

Bread1009 commented 1 year ago

No problem.