Uzuy/Uzuy X - Tool - Submodule.bat
Phoenix e85ff33df6 chore(scripts): update submodule management batch script
- Fixed path formatting issues for Windows batch script by using backslashes (`\`) in `rmdir` commands.
- Added `--force` option to `git submodule add` commands to handle existing local directories.
- Addressed warnings related to line-ending conversion (LF to CRLF).
- Improved error handling during submodule cleanup, removal, and reinitialization.
2024-09-07 20:31:30 +10:00

99 lines
4.2 KiB
Batchfile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@echo off
title Uzuy X - Tool [Submodule]
REM Phoenix ASCII Logo
echo.
echo  /\
echo  //\\
echo  // \\
echo  // \\
echo  // \\
echo  //________\\
echo  \\ //
echo  \\ //
echo  \\ //
echo  \\ //
echo  \//
echo Proceed with warning!
timeout /t 5
echo Deinitializing submodules...
git submodule deinit -f --all
echo Removing submodule entries from Git index...
git rm -f externals/enet
git rm -f externals/cubeb
git rm -f externals/dynarmic
git rm -f externals/libusb/libusb
git rm -f externals/discord-rpc
git rm -f externals/Vulkan-Headers
git rm -f externals/sirit
git rm -f externals/mbedtls
git rm -f externals/xbyak
git rm -f externals/opus
git rm -f externals/SDL
git rm -f externals/cpp-httplib
git rm -f externals/ffmpeg/ffmpeg
git rm -f externals/vcpkg
git rm -f externals/cpp-jwt
git rm -f externals/libadrenotools
git rm -f externals/nx_tzdb/tzdb_to_nx
git rm -f externals/VulkanMemoryAllocator
git rm -f externals/breakpad
git rm -f externals/simpleini
git rm -f externals/oaknut
git rm -f externals/Vulkan-Utility-Libraries
echo Removing submodule directories...
rmdir /S /Q "externals\enet"
rmdir /S /Q "externals\cubeb"
rmdir /S /Q "externals\dynarmic"
rmdir /S /Q "externals\libusb\libusb"
rmdir /S /Q "externals\discord-rpc"
rmdir /S /Q "externals\Vulkan-Headers"
rmdir /S /Q "externals\sirit"
rmdir /S /Q "externals\mbedtls"
rmdir /S /Q "externals\xbyak"
rmdir /S /Q "externals\opus"
rmdir /S /Q "externals\SDL"
rmdir /S /Q "externals\cpp-httplib"
rmdir /S /Q "externals\ffmpeg\ffmpeg"
rmdir /S /Q "externals\vcpkg"
rmdir /S /Q "externals\cpp-jwt"
rmdir /S /Q "externals\libadrenotools"
rmdir /S /Q "externals\nx_tzdb\tzdb_to_nx"
rmdir /S /Q "externals\VulkanMemoryAllocator"
rmdir /S /Q "externals\breakpad"
rmdir /S /Q "externals\simpleini"
rmdir /S /Q "externals\oaknut"
rmdir /S /Q "externals\Vulkan-Utility-Libraries"
echo Adding submodules...
git submodule add --force https://github.com/lsalzman/enet.git externals/enet
git submodule add --force https://github.com/mozilla/cubeb.git externals/cubeb
git submodule add --force https://github.com/PabloMK7/dynarmic.git externals/dynarmic
git submodule add --force https://github.com/libusb/libusb.git externals/libusb/libusb
git submodule add --force https://github.com/uzuy-emu/discord-rpc.git externals/discord-rpc
git submodule add --force https://github.com/KhronosGroup/Vulkan-Headers.git externals/Vulkan-Headers
git submodule add --force https://github.com/uzuy-emu/sirit.git externals/sirit
git submodule add --force https://github.com/uzuy-emu/mbedtls.git externals/mbedtls
git submodule add --force https://github.com/herumi/xbyak.git externals/xbyak
git submodule add --force https://github.com/xiph/opus.git externals/opus
git submodule add --force https://github.com/libsdl-org/SDL.git externals/SDL
git submodule add --force https://github.com/yhirose/cpp-httplib.git externals/cpp-httplib
git submodule add --force https://github.com/FFmpeg/FFmpeg.git externals/ffmpeg/ffmpeg
git submodule add --force https://github.com/microsoft/vcpkg.git externals/vcpkg
git submodule add --force https://github.com/arun11299/cpp-jwt.git externals/cpp-jwt
git submodule add --force https://github.com/bylaws/libadrenotools.git externals/libadrenotools
git submodule add --force https://github.com/lat9nq/tzdb_to_nx.git externals/nx_tzdb/tzdb_to_nx
git submodule add --force https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git externals/VulkanMemoryAllocator
git submodule add --force https://github.com/uzuy-emu/breakpad.git externals/breakpad
git submodule add --force https://github.com/brofield/simpleini.git externals/simpleini
git submodule add --force https://github.com/merryhime/oaknut externals/oaknut
git submodule add --force https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git externals/Vulkan-Utility-Libraries
echo Updating submodules recursively...
git submodule update --init --recursive
echo Done!
pause