configure.sh 632 B

123456789101112131415161718192021
  1. #!/bin/bash
  2. # To lower build times, we avoid running the fetchDependencies script if the MoltenVK
  3. # version didn't change. The last-built MoltenVK version is stored inside a file in
  4. # the timestamp directory. If the file doesn't exist or the file contains a different
  5. # MoltenVK version, fetchDependencies is ran.
  6. #
  7. # Usage: configure.sh <timestamp directory> <source directory> <MoltenVK version>
  8. #
  9. set -e
  10. VERSION_PATH="$1/MoltenVK-last-version.txt"
  11. CURRENT_VERSION="$3"
  12. LAST_VERSION=$(cat "$VERSION_PATH" || true)
  13. if ! [ "$LAST_VERSION" = "$3" ]; then
  14. $2/fetchDependencies --macos
  15. echo $CURRENT_VERSION > $VERSION_PATH
  16. fi