summaryrefslogtreecommitdiffstats
path: root/misc/scripts/install_vulkan_sdk_macos.sh
blob: bc41134ba2a6f1b86fa4ad1bd6c7f6ba810f7dd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env sh

set -euo pipefail
IFS=$'\n\t'

# Download and install the Vulkan SDK.
curl -L "https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.dmg" -o /tmp/vulkan-sdk.dmg
hdiutil attach /tmp/vulkan-sdk.dmg -mountpoint /Volumes/vulkan-sdk
/Volumes/vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan \
    --accept-licenses --default-answer --confirm-command install

cnt=5
until hdiutil detach -force /Volumes/vulkan-sdk
do
   [[ cnt -eq "0" ]] && break
   sleep 1
   ((cnt--))
done

rm -f /tmp/vulkan-sdk.dmg

echo 'Vulkan SDK installed successfully! You can now build Redot by running "scons".'