SPIRV-Cross/checkout_glslang_spirv_tools.sh
Hans-Kristian Arntzen ec42cb1c41 Roll deps.
2024-01-05 13:36:34 +01:00

53 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
GLSLANG_REV=a7785ea1ff5b10bfc2d8ca77fdad5929562897b7
SPIRV_TOOLS_REV=afaf8fda2ad0364655909b56c8b634ce89095bb5
SPIRV_HEADERS_REV=e867c06631767a2d96424cbec530f9ee5e78180f
PROTOCOL=https
if [ -d external/glslang ]; then
echo "Updating glslang to revision $GLSLANG_REV."
cd external/glslang
git fetch origin
git checkout $GLSLANG_REV
else
echo "Cloning glslang revision $GLSLANG_REV."
mkdir -p external
cd external
git clone $PROTOCOL://github.com/KhronosGroup/glslang.git
cd glslang
git checkout $GLSLANG_REV
fi
cd ../..
if [ -d external/spirv-tools ]; then
echo "Updating SPIRV-Tools to revision $SPIRV_TOOLS_REV."
cd external/spirv-tools
git fetch origin
git checkout $SPIRV_TOOLS_REV
else
echo "Cloning SPIRV-Tools revision $SPIRV_TOOLS_REV."
mkdir -p external
cd external
git clone $PROTOCOL://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
cd spirv-tools
git checkout $SPIRV_TOOLS_REV
fi
if [ -d external/spirv-headers ]; then
cd external/spirv-headers
git fetch origin
git checkout $SPIRV_HEADERS_REV
cd ../..
else
git clone $PROTOCOL://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
cd external/spirv-headers
git checkout $SPIRV_HEADERS_REV
cd ../..
fi
cd ../..