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'