2022-02-11 19:01:25 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -exuo pipefail
|
|
|
|
|
|
|
|
echo "Note: You should run gclient sync before this script"
|
|
|
|
|
|
|
|
# Remove unneeded dependencies
|
|
|
|
rm -rf build
|
|
|
|
rm -rf buildtools
|
|
|
|
rm -rf testing
|
|
|
|
rm -rf third_party/angle
|
2022-05-09 04:19:04 +00:00
|
|
|
rm -rf third_party/benchmark
|
2022-02-11 19:01:25 +00:00
|
|
|
rm -rf third_party/catapult
|
|
|
|
rm -rf third_party/googletest
|
2023-05-27 15:38:11 +00:00
|
|
|
rm -rf third_party/google_benchmark
|
2022-05-09 04:19:04 +00:00
|
|
|
rm -rf third_party/gpuweb-cts
|
2022-02-11 19:01:25 +00:00
|
|
|
rm -rf third_party/llvm-build
|
2022-05-09 04:19:04 +00:00
|
|
|
rm -rf third_party/protobuf
|
2022-02-11 19:01:25 +00:00
|
|
|
rm -rf third_party/swiftshader
|
|
|
|
rm -rf third_party/vulkan_memory_allocator
|
|
|
|
rm -rf third_party/vulkan-deps/glslang
|
|
|
|
rm -rf third_party/vulkan-deps/spirv-cross
|
|
|
|
rm -rf third_party/vulkan-deps/vulkan-loader
|
|
|
|
rm -rf third_party/vulkan-deps/vulkan-validation-layers
|
2022-05-09 04:19:04 +00:00
|
|
|
rm -rf third_party/webgpu-cts
|
2022-02-11 19:01:25 +00:00
|
|
|
rm -rf third_party/zlib
|
|
|
|
|
2022-02-11 19:13:29 +00:00
|
|
|
# Ensure vulkan-deps are committed
|
2022-05-09 04:19:04 +00:00
|
|
|
rm -f third_party/vulkan-deps/.gitignore
|
2022-02-11 19:13:29 +00:00
|
|
|
|
2022-02-11 19:01:25 +00:00
|
|
|
# Remove gitmodules, some third_party/ repositories contain these and leaving them around would
|
|
|
|
# cause any recursive submodule clones to fail because e.g. some reference internal Google
|
|
|
|
# repositories. We don't want them anyway.
|
|
|
|
find third_party -type f -name .gitmodules -delete
|
|
|
|
|
|
|
|
# Turn subrepositories into regular folders.
|
|
|
|
find third_party -depth -type d -name .git -exec rm -rf {} \;
|
|
|
|
|
|
|
|
# Remove files that are not needed.
|
|
|
|
find third_party -depth -type d -name tests -print -exec rm -rf {} \;
|
|
|
|
find third_party -depth -type d -name docs -print -exec rm -rf {} \;
|
|
|
|
find third_party -depth -type d -name samples -print -exec rm -rf {} \;
|
|
|
|
rm -rf third_party/swiftshader/third_party/SPIRV-Tools # already in third_party/vulkan-deps/spirv-tools
|
|
|
|
rm -rf third_party/swiftshader/third_party/SPIRV-Headers # already in third_party/vulkan-deps/spirv-headers
|
|
|
|
|
|
|
|
git add third_party/
|
|
|
|
echo "you may now 'git commit -s -m 'update dependencies' if you are happy with the staged changes"
|