refine run-mac.sh