Skip to content

Commit 23f7539

Browse files
committed
update GameNetworkingSockets; improve submodules script
1 parent 23fc4d8 commit 23f7539

File tree

2 files changed

+32
-4
lines changed

2 files changed

+32
-4
lines changed

submodules.sh

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
#!/bin/bash
22

3-
git submodule update --init
4-
(cd externals/dawn/dawn && git submodule update --init "third_party/abseil-cpp" "third_party/protobuf" "third_party/spirv-headers/src" "third_party/spirv-tools/src" "third_party/vulkan-headers/src" "third_party/vulkan-utility-libraries/src" "third_party/jinja2" "third_party/markupsafe")
5-
(cd externals/wamr/zydis/dependencies && git submodule update --init)
3+
set -e
4+
5+
update_submodule()
6+
{
7+
local repo_path="$1"
8+
local sub_path="$2"
9+
pushd "$repo_path" >/dev/null
10+
if [ -d "$sub_path/.git" ] || [ -f "$sub_path/.git" ]; then
11+
echo "Skipping $repo_path/$sub_path"
12+
else
13+
echo "Initializing $repo_path/$sub_path"
14+
git submodule update --init "$sub_path"
15+
fi
16+
popd >/dev/null
17+
}
18+
19+
git submodule init
20+
21+
git config --file .gitmodules --get-regexp path | awk '{print $2}' | while read -r sub; do
22+
update_submodule "." "$sub"
23+
done
24+
25+
update_submodule "externals/wamr/zydis" "dependencies/zycore"
26+
update_submodule "externals/dawn/dawn" "third_party/abseil-cpp"
27+
update_submodule "externals/dawn/dawn" "third_party/protobuf"
28+
update_submodule "externals/dawn/dawn" "third_party/spirv-headers/src"
29+
update_submodule "externals/dawn/dawn" "third_party/spirv-tools/src"
30+
update_submodule "externals/dawn/dawn" "third_party/vulkan-headers/src"
31+
update_submodule "externals/dawn/dawn" "third_party/vulkan-utility-libraries/src"
32+
update_submodule "externals/dawn/dawn" "third_party/jinja2"
33+
update_submodule "externals/dawn/dawn" "third_party/markupsafe"

0 commit comments

Comments
 (0)