diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/disser/templates/nomake.cmd')
-rw-r--r-- | Master/texmf-dist/doc/latex/disser/templates/nomake.cmd | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/Master/texmf-dist/doc/latex/disser/templates/nomake.cmd b/Master/texmf-dist/doc/latex/disser/templates/nomake.cmd index 8541b2d85d5..1bd384fb3e1 100644 --- a/Master/texmf-dist/doc/latex/disser/templates/nomake.cmd +++ b/Master/texmf-dist/doc/latex/disser/templates/nomake.cmd @@ -3,42 +3,53 @@ rem nomake script for LaTeX projects rem Author: Stanislav Kruchinin <stanislav.kruchinin@gmail.com> +if "%CMDEXTVERSION%"=="" ( + echo This script requires command interpreter from Windows 2000 or above. + goto :eof +) + setlocal enabledelayedexpansion set target=thesis -if "!texmf!"=="" set texmf=%programfiles%\miktex -if "!docdir!"=="" set docdir=!texmf!\doc\latex\disser +if "!texmf!"=="" set texmf=%programfiles%\miktex +if "!destdir!"=="" set destdir=!texmf! +if "!docdir!"=="" set docdir=!destdir!\doc\latex\disser if "!subdirs!"=="" set subdirs=bachelor ..\master ..\candidate ..\doctor -if "%CMDEXTVERSION%"=="" ( - echo Error: This script requires command interpreter from Windows 2000 or above. - goto :eof -) if "%1"=="help" ( + call :%1 +) else if "%1"=="install" ( + call :%1 +) else if "%1"=="uninstall" ( + call :%1 +) else if "%1"=="reinstall" ( + call :%1 +) else ( + for %%i in (%subdirs%) do @cd %%i & call nomake %* +) + +exit /b + :help - cd bachelor & call nomake help & cd .. + cd candidate & call nomake help & cd .. echo install install templates to TeX tree echo uninstall uninstall templates echo reinstall reinstall templates goto :eof -) else if "%1"=="install" ( + :install - if not exist "%docdir%" md "%docdir%" - xcopy /y /e /i /f ..\templates "%docdir%\templates" - xcopy /y /e /i /f ..\include "%docdir%\include" + if not exist "!docdir!" mkdir "!docdir!" + xcopy /y /e /i /f ..\templates "!docdir!\templates" + xcopy /y /e /i /f ..\include "!docdir!\include" goto :eof -) else if "%1"=="uninstall" ( + :uninstall - rmdir /s /q %docdir%\templates - rmdir /s /q %docdir%\include - rmdir %docdir% + rmdir /s /q "!docdir!" goto :eof -) else if "%1"=="reinstall" ( + :reinstall call :uninstall call :install goto :eof -) -for %%i in (%subdirs%) do @cd %%i & call nomake %*
\ No newline at end of file |