From 22421585a0adf538960b1a805323e9a2317d34cb Mon Sep 17 00:00:00 2001 From: Morny Date: Wed, 8 May 2024 08:50:59 +0100 Subject: [PATCH] Update --- .gitmodules | 5 +++++ clean-repo.sh | 31 +++++++++++++++++++++++++++++++ libs/nanovg_vulkan | 1 + libs/rccp | 1 + libs/zing | 1 + vcpkg | 2 +- zep | 2 +- 7 files changed, 41 insertions(+), 2 deletions(-) create mode 100644 clean-repo.sh create mode 160000 libs/nanovg_vulkan create mode 160000 libs/rccp create mode 160000 libs/zing diff --git a/.gitmodules b/.gitmodules index 5c9dde5..23dc731 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,15 +1,20 @@ [submodule "zep"] path = zep url = https://github.com/Rezonality/zep + branch = master [submodule "vcpkg"] path = vcpkg url = https://github.com/Microsoft/vcpkg.git + branch = master [submodule "libs/zing"] path = libs/zing url = https://github.com/Rezonality/zing + branch = main [submodule "libs/rccp"] path = libs/rccp url = https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus + branch = master [submodule "libs/nanovg_vulkan"] path = libs/nanovg_vulkan url = https://github.com/danilw/nanovg_vulkan.git + branch = master diff --git a/clean-repo.sh b/clean-repo.sh new file mode 100644 index 0000000..a4121f6 --- /dev/null +++ b/clean-repo.sh @@ -0,0 +1,31 @@ +git config -f .gitmodules --get-regexp '^submodule\..*\.path$' | + while read path_key path + do + url_key=$(echo $path_key | sed 's/\.path/.url/'); + branch_key=$(echo $path_key | sed 's/\.path/.branch/'); + # If the url_key doesn't yet exist then backup up the existing + # directory if necessary and add the submodule + if [ ! $(git config --get "$url_key") ]; then + if [ -d "$path" ] && [ ! $(git config --get "$url_key") ]; then + mv "$path" "$path""_backup_""$(date +'%Y%m%d%H%M%S')"; + fi; + url=$(git config -f .gitmodules --get "$url_key"); + # If a branch is specified then use that one, otherwise + # default to master + branch=$(git config -f .gitmodules --get "$branch_key"); + if [ ! "$branch" ]; then branch="main"; fi; + git submodule add -f -b "$branch" "$url" "$path"; + fi; + done; + +# In case the submodule exists in .git/config but the url is out of date + +git submodule sync; + +# Now actually pull all the modules. I used to use this... +# +# git submodule update --init --remote --force --recursive +# ...but the submodules would check out in detached HEAD state and I +# didn't like that, so now I do this... + +git submodule foreach --recursive 'git checkout $(git config -f $toplevel/.gitmodules submodule.$name.branch || echo main)'; diff --git a/libs/nanovg_vulkan b/libs/nanovg_vulkan new file mode 160000 index 0000000..2e9ba46 --- /dev/null +++ b/libs/nanovg_vulkan @@ -0,0 +1 @@ +Subproject commit 2e9ba4679cdfc4b230399c9ba8c33682fbb0c898 diff --git a/libs/rccp b/libs/rccp new file mode 160000 index 0000000..c77c6b8 --- /dev/null +++ b/libs/rccp @@ -0,0 +1 @@ +Subproject commit c77c6b83cf9e8143050ccf4914ad75ae2767c975 diff --git a/libs/zing b/libs/zing new file mode 160000 index 0000000..565a222 --- /dev/null +++ b/libs/zing @@ -0,0 +1 @@ +Subproject commit 565a22268490b83a249989b6c68c97263147bf4a diff --git a/vcpkg b/vcpkg index c6d6efe..b323a59 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit c6d6efed3e9b4242765bfe1b5c5befffd85f7b92 +Subproject commit b323a5992e8cc742deddac74df6224419d662c16 diff --git a/zep b/zep index cd61d52..e743a43 160000 --- a/zep +++ b/zep @@ -1 +1 @@ -Subproject commit cd61d52c4dfc242032062e5f7d0822dd4b75b3cf +Subproject commit e743a43c384796dc0fc449245d9edf42390a7124