install_vulkan_sdk_macos.sh 616 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env sh
  2. set -euo pipefail
  3. IFS=$'\n\t'
  4. # Download and install the Vulkan SDK.
  5. curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg" -o /tmp/vulkan-sdk.dmg
  6. hdiutil attach /tmp/vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
  7. /Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan \
  8. --accept-licenses --default-answer --confirm-command install
  9. cnt=5
  10. until hdiutil detach -force /Volumes/vulkan-sdk
  11. do
  12. [[ cnt -eq "0" ]] && break
  13. sleep 1
  14. ((cnt--))
  15. done
  16. rm -f /tmp/vulkan-sdk.dmg
  17. echo 'Vulkan SDK installed successfully! You can now build Godot by running "scons".'