added .bat file for Windows users

pull/188/head
Sheppe Pharis 2022-04-23 12:43:57 -07:00
parent 9a97023dc6
commit 1595173d1c
1 changed files with 25 additions and 0 deletions

25
build-collections.bat Normal file
View File

@ -0,0 +1,25 @@
@echo off
if "%1"=="" (
echo "Usage: build-collections.bat path-to-collections/collection-file.xml path-to-utilities/merge.xml [optional path-to-compendium-destination-directory]
echo "Include path to XML collection file(s) as the first parameter to this batch script."
exit /b
)
if "%2"=="" (
echo "Usage: build-collections.bat path-to-collections/collection-file.xml path-to-utilities/merge.xml [optional path-to-compendium-destination-directory]
echo "Include the path to the merge.xml file, typically at {repository}/Utilities/merge.xml, as the second parameter to this batch script."
exit /b
)
for %%A in ("%1") do (
if "%3"=="" (
xsltproc -o "%%~nxA" "%~f2" "%%~fA"
) else (
if exist "%3\" (
xsltproc -o "%~f3\%%~nxA" "%~f2" "%%~fA"
) else (
mkdir %3
xsltproc -o "%~f3\%%~nxA" "%~f2" "%%~fA"
)
)
)