From 8d15a41f1ba19a223770fbdc20a0452ec09d9885 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Tue, 12 Aug 2025 04:36:55 -0400 Subject: [PATCH] - update windows update-subtrees.cmd to instead point to the bash script, it will execute git-bash to run it - always use absolute url's for subtrees, don't lock ourselves to github --- tools/update-subtrees.cmd | 8 ++++++-- tools/update-subtrees.sh | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/update-subtrees.cmd b/tools/update-subtrees.cmd index 6facb94b6..b74eee670 100644 --- a/tools/update-subtrees.cmd +++ b/tools/update-subtrees.cmd @@ -1,3 +1,7 @@ @echo off -git subtree pull --prefix=libraries/ZWidget https://github.com/dpjudas/ZWidget master --squash -git subtree pull --prefix=libraries/ZMusic https://github.com/ZDoom/ZMusic master --squash +setlocal +cd "%~dp0" +for /f "delims=" %%I in ('where git.exe') do set GIT_PATH="%%~dpI" +if errorlevel 1 echo "Unable to find git.exe!" +if errorlevel 1 goto :eof +%GIT_PATH%\..\bin\bash.exe update-subtrees.sh %* diff --git a/tools/update-subtrees.sh b/tools/update-subtrees.sh index 3c32492b9..459eabdbf 100755 --- a/tools/update-subtrees.sh +++ b/tools/update-subtrees.sh @@ -6,11 +6,11 @@ pull() { if [[ "${1}" == "${2}" || "${1}" == "all" ]] then echo "fetching ${2}" - git subtree pull --prefix="${3}" "https://github.com/${4}" "${5}" --squash || exit + git subtree pull --prefix="${3}" "${4}" "${5}" --squash || exit else echo "${2} not specified, skipping" fi } -pull "$1" 'zwidget' 'libraries/ZWidget' 'dpjudas/ZWidget' 'master' -pull "$1" 'zmusic' 'libraries/ZMusic' 'ZDoom/ZMusic' 'master' +pull "$1" 'zwidget' 'libraries/ZWidget' 'https://github.com/dpjudas/ZWidget' 'master' +pull "$1" 'zmusic' 'libraries/ZMusic' 'https://github.com/ZDoom/ZMusic' 'master'