diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/mversion/mVersion.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/mversion/mVersion.sty | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/mversion/mVersion.sty b/Master/texmf-dist/tex/latex/mversion/mVersion.sty new file mode 100644 index 00000000000..4492d3b822d --- /dev/null +++ b/Master/texmf-dist/tex/latex/mversion/mVersion.sty @@ -0,0 +1,69 @@ +%% +%% This is file `mVersion.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% mVersion.dtx (with options: `package') +%% +%% This is a generated file. +%% +%% Copyright (C) 2011 by Michael Schmeing <michael.schmeing@googlemail.com> +%% +%% This file may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.2 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.2 or later is part of all distributions of LaTeX version +%% 1999/12/01 or later. +%% +\NeedsTeXFormat{LaTeX2e}[1999/12/01] +\ProvidesPackage{mVersion} + [2011/10/18 v1.0 easy versioning for LaTeX] +\def\parseline#1;#2 %this space is important +{ + \def\versionnumber{#1} + \def\buildnumber{#2} +} +\IfFileExists{version.dat} +{ } +{ +\newwrite\outfile +\immediate\openout\outfile=version.dat +\immediate\write\outfile{0.0;0} +\immediate\closeout\outfile +} +\newread\versionfile +\openin\versionfile=version.dat +\read\versionfile to \versionline +\closein\versionfile +\expandafter\parseline\versionline +\newcounter{buildcounter} +\setcounter{buildcounter}{\buildnumber} +\newcommand{\version}{\versionnumber.\thebuildcounter} +\newcommand{\setVersion}[1] +{ +\newwrite\outfile +\immediate\openout\outfile=version.dat +\immediate\write\outfile{#1;\thebuildcounter} +\immediate\closeout\outfile +\newread\versionfile +\openin\versionfile=version.dat +\read\versionfile to \versionline +\expandafter\parseline\versionline +\closein\versionfile +} +\newcommand{\increaseBuild} +{ +\stepcounter{buildcounter} +\newwrite\outfile +\immediate\openout\outfile=version.dat +\immediate\write\outfile{\versionnumber;\thebuildcounter} +\immediate\closeout\outfile +} +\endinput +%% +%% End of file `mVersion.sty'. |