SPIRV-Cross-Vulnerable/checkout_glslang_spirv_tools.sh

53 lines
1.3 KiB
Bash
Raw Normal View History

#!/bin/bash
2021-05-08 08:24:34 +00:00
# Copyright 2016-2021 The Khronos Group Inc.
# SPDX-License-Identifier: Apache-2.0
2022-11-01 11:47:56 +00:00
GLSLANG_REV=1a8869e4d1bee138f2813208777e1a58bebb9735
2022-09-12 10:37:27 +00:00
SPIRV_TOOLS_REV=fb27bbf3077f92cc1a8a55777bce2810a94079cf
2022-09-02 12:58:04 +00:00
SPIRV_HEADERS_REV=87d5b782bec60822aa878941e6b13c0a9a954c9b
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 pull origin master
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 ../..