Closed Siffredi84 closed 1 year ago
Hi @Siffredi84 !
You're doing nothing wrong, mcbash does not yet work out of the box on macOS. Sorry.
It seems macOS is stuck on an old version of bash (due to some licensing reasons).
Your system is probably running bash-3.2, and unfortunately, checking the existence of a variable with -v
has only been implemented in bash-4.2 (see this recent post).
However, you might overcome this issue by updating your bash version. Check those links I refered in a similar issue elsewhere :
As there are other ways to check the existence of a variable, I could change some lines in the future for mcbash to be compatible with older versions of bash.
Thanks for your feedback, I should mention this compatibility problem in the readme.
Cheers !
Well, I've changed the way variables' existence is evaluated in the last commit.
It should not affect anything for users of newer bash versions, but make mcbash
compatible with older ones.
Do not hesitate to tell me if it works for you now.
Cheers
it's working now :D . I installed the newer bash version and the modified mcbash. thanks for the quick reply and fix !! keep up the good work :)
And a question that I have... this script only scan for "normal" portal ended in /c? or scan other types ended in /stalker_portal, /server.load etc?
Glad it worked!
I'm certainly not qualified to provide a serious answer to your question, but as far as I understand, the feedback you get from a server is independant of the path (what is after the domain name and port). So I would say yes, it ~can communicate with any type of server.
Again, not a 100% sure as I made this script for fun and don't even use it myself.
hi, iam trying to run the program on macOS and I'm getting this error:
"/usr/local/bin/mcbash ; exit; /usr/local/bin/mcbash: line 21: conditional binary operator expected /usr/local/bin/mcbash: line 21: syntax error near
only_outputs_mac' /usr/local/bin/mcbash: line 21:
[[ ! -v only_outputs_mac ]] && \'"am i doing something wrong or it can't run on macOS?
thanks in advance and great work!!