parent
90d5ae0cfb
commit
1604846d09
@ -1,71 +1,11 @@
|
||||
@echo off
|
||||
chcp 65001 >nul
|
||||
|
||||
set flag=%1
|
||||
if %flag%x == x (
|
||||
set flag=instr
|
||||
)
|
||||
|
||||
if %flag%x == instrx (
|
||||
call :cleanall
|
||||
call :instr
|
||||
if ERRORLEVEL 1 (
|
||||
echo Error! Please check the 'instructions.log' for more details...
|
||||
pause
|
||||
) else (
|
||||
call :clean
|
||||
echo Finished!
|
||||
)
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
if %flag%x == cleanx (
|
||||
call :clean
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
if %flag%x == cleanallx (
|
||||
call :cleanall
|
||||
goto :EOF
|
||||
)
|
||||
|
||||
:help
|
||||
echo This is the compile batch script for CNAP Instructions.
|
||||
echo Usage:
|
||||
echo make.bat [option]
|
||||
echo options:
|
||||
echo instr Compile the instructions book (default)
|
||||
echo clean Clean all work files
|
||||
echo cleanall Clean all work files and generated pdf
|
||||
echo help Print this help message
|
||||
goto :EOF
|
||||
|
||||
:instr
|
||||
echo Compile...
|
||||
latexmk -xelatex -shell-escape --halt-on-error -silent instructions >nul 2>nul
|
||||
goto :EOF
|
||||
|
||||
:clean
|
||||
echo Clean files...
|
||||
latexmk -c -silent 2>nul
|
||||
del instructions.bbl >nul 2>nul
|
||||
del instructions.listing >nul 2>nul
|
||||
del instructions.xdv >nul 2>nul
|
||||
del instructions.run.xml >nul 2>nul
|
||||
rmdir /S /Q _minted-instructions >nul 2>nul
|
||||
goto :EOF
|
||||
|
||||
:cleanall
|
||||
echo Clean files...
|
||||
latexmk -C -silent 2>nul
|
||||
del instructions.bbl >nul 2>nul
|
||||
del instructions.listing >nul 2>nul
|
||||
del instructions.xdv >nul 2>nul
|
||||
del instructions.run.xml >nul 2>nul
|
||||
rmdir /S /Q _minted-instructions >nul 2>nul
|
||||
if exist instructions.pdf (
|
||||
echo Close the file: instructions.pdf!
|
||||
pause
|
||||
call :cleanall
|
||||
)
|
||||
goto :EOF
|
||||
echo Compiling...
|
||||
latexmk -xelatex -shell-escape --halt-on-error -silent instructions >nul 2>nul
|
||||
echo Done!
|
||||
|
||||
echo Clean files...
|
||||
latexmk -c -silent 2>nul
|
||||
del instructions.listing >nul 2>nul
|
||||
del instructions.xdv >nul 2>nul
|
||||
rmdir /S /Q _minted-instructions >nul 2>nul
|
||||
echo Done!
|
||||
|
@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo Compiling...
|
||||
latexmk -xelatex -shell-escape --halt-on-error -silent instructions > /dev/null 2>&1
|
||||
echo Done!
|
||||
|
||||
echo Clean files...
|
||||
latexmk -c -silent > /dev/null 2>&1
|
||||
rm instructions.listing > /dev/null 2>&1
|
||||
rm instructions.xdv > /dev/null 2>&1
|
||||
rm -r _minted-instructions > /dev/null 2>&1
|
||||
echo Done!
|
Loading…
Reference in new issue