summaryrefslogtreecommitdiff
path: root/Externals/MoltenVK/configure.sh
blob: 50490261172c2690bf5dd8414f7107307466dd4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# To lower build times, we avoid running the fetchDependencies script if the MoltenVK
# version didn't change. The last-built MoltenVK version is stored inside a file in
# the timestamp directory. If the file doesn't exist or the file contains a different
# MoltenVK version, fetchDependencies is ran.
#
# Usage: configure.sh <timestamp directory> <source directory> <MoltenVK version>
#

set -e

VERSION_PATH="$1/MoltenVK-last-version.txt"
CURRENT_VERSION="$3"
LAST_VERSION=$(cat "$VERSION_PATH" || true)

if ! [ "$LAST_VERSION" = "$3" ]; then
  $2/fetchDependencies --macos
  echo $CURRENT_VERSION > $VERSION_PATH
fi