bgfx/3rdparty/spirv-cross/checkout_glslang_spirv_tools.sh

56 lines
1.4 KiB
Bash
Raw Normal View History

2019-01-10 06:23:47 +03:00
#!/bin/bash
2019-05-18 22:28:43 +03:00
GLSLANG_REV=e291f7a09f6733f6634fe077a228056fabee881e
SPIRV_TOOLS_REV=89fe836fe22c3e5c2a062ebeade012e2c2f0839b
SPIRV_HEADERS_REV=c4f8f65792d4bf2657ca751904c511bbcf2ac77b
2019-01-10 06:23:47 +03:00
2019-04-15 07:53:50 +03:00
if [ -z $PROTOCOL ]; then
PROTOCOL=git
fi
echo "Using protocol \"$PROTOCOL\" for checking out repositories. If this is problematic, try PROTOCOL=https $0."
2019-01-10 06:23:47 +03:00
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
2019-04-15 07:53:50 +03:00
git clone $PROTOCOL://github.com/KhronosGroup/glslang.git
2019-01-10 06:23:47 +03:00
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
2019-04-15 07:53:50 +03:00
git clone $PROTOCOL://github.com/KhronosGroup/SPIRV-Tools.git spirv-tools
2019-01-10 06:23:47 +03:00
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
2019-04-15 07:53:50 +03:00
git clone $PROTOCOL://github.com/KhronosGroup/SPIRV-Headers.git external/spirv-headers
2019-01-10 06:23:47 +03:00
cd external/spirv-headers
git checkout $SPIRV_HEADERS_REV
cd ../..
fi
cd ../..