summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/disser/templates/nomake.cmd
blob: 1bd384fb3e14254ad49f4466881f1af4cd53c2f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@echo off

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 "!destdir!"=="" set destdir=!texmf!
if "!docdir!"==""  set docdir=!destdir!\doc\latex\disser
if "!subdirs!"=="" set subdirs=bachelor ..\master ..\candidate ..\doctor


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 candidate & call nomake help & cd ..
	echo   install    install templates to TeX tree
	echo   uninstall  uninstall templates
	echo   reinstall  reinstall templates
goto :eof

:install
	if not exist "!docdir!" mkdir "!docdir!"
	xcopy /y /e /i /f ..\templates "!docdir!\templates"
	xcopy /y /e /i /f ..\include "!docdir!\include"
goto :eof

:uninstall
	rmdir /s /q "!docdir!"
goto :eof

:reinstall
	call :uninstall
	call :install
goto :eof