I don’t know why it’s not detecting your OS. I use this line to detect Mac. But I don’t own a Mac so this isn’t an important feature for me.
elif [[ $OSTYPE == "darwin"* ]]; then
export TARGET="macos"
Try building with ./buildSystem.sh --allMac. Please start a new, clean folder and pull the project into that. Don’t run it out of another folder like /Users/max/Library. That’s a recipe for mess and disaster.