OSDN Git Service

Reset 'round' after successful improvement, rather than breaking the loop after the...
[mhash384/mhash384.git] / z_mkdocs.cmd
1 @echo off
2 setlocal enabledelayedexpansion
3
4 if not exist "%JAVA_HOME%\bin\java.exe" (
5         echo Java could not be found, please make sure JAVA_HOME is set correctly!
6         pause && goto:eof
7 )
8
9 for %%i in ("%~dp0\*.md") do (
10         echo PANDOC: %%~nxi
11         "%~dp0\..\Prerequisites\Pandoc\pandoc.exe" --from markdown_github+pandoc_title_block+header_attributes+implicit_figures --to html5 --toc -N --standalone -H "%~dp0\..\Prerequisites\Pandoc\css\github-pandoc.inc" "%%~i" | "%JAVA_HOME%\bin\java.exe" -jar "%~dp0\..\Prerequisites\HTMLCompressor\bin\htmlcompressor-1.5.3.jar" --compress-css -o "%%~dpni.html"
12         if not "!ERRORLEVEL!"=="0" (
13                 "%~dp0\..\Prerequisites\CEcho\cecho.exe" red "\nSomething went wrong^^!\n"
14                 pause && exit
15         )
16 )
17
18 echo.
19 pause