From 1595173d1c9314dd29ecf5b8ba8cf4c34557440f Mon Sep 17 00:00:00 2001 From: Sheppe Pharis Date: Sat, 23 Apr 2022 12:43:57 -0700 Subject: [PATCH] added .bat file for Windows users --- build-collections.bat | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 build-collections.bat diff --git a/build-collections.bat b/build-collections.bat new file mode 100644 index 0000000..5ae1237 --- /dev/null +++ b/build-collections.bat @@ -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" + ) + ) +) \ No newline at end of file