# TODO: Maybe turn this into a target in the makefile OS=$(uname) if [ $OS = "Darwin" ]; then VULKAN_SDK_PATH=/Users/dportnoy15/Development/vulkan-sdk-macos-1.1.108.0/macOS fi if [ $OS = "Linux" ]; then VULKAN_SDK_PATH=/home/dportnoy/Desktop/VulkanSDK/1.1.106.0/x86_64 fi echo $VULKAN_SDK_PATH shopt -s nullglob shopt -s extglob FILES=./!(*.spv) for f in $FILES do shaderName=$(echo $f | sed 's/\.\/\(.*\)\..*/\1/') shaderType=$(echo $f | sed 's/\.\/.*\.\(.*\)/\1/') fOut="$shaderName-$shaderType.spv" $VULKAN_SDK_PATH/bin/glslangValidator -V $f -o $fOut done