Skip to content

Conversation

VinegarLove
Copy link
Contributor

CORES variable assignment wouldn't work with shell other than bash.
I've fixed the variable assignment to be compatible with all shells. Bash behaviour remain unchanged.

fixed the way the CORES variable assignment  to be compliant with other shells other than bash
@Calinou
Copy link
Member

Calinou commented Nov 28, 2021

I can confirm this works on zsh:

~
❯ CORES=$(grep -c \^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu)

~
❯ echo $CORES          
8

Copy link
Member

@Calinou Calinou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Contributor

@twaritwaikar twaritwaikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! :D

@twaritwaikar twaritwaikar merged commit 2d938a8 into godotengine:master Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants