summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/mversion
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2011-10-19 22:27:29 +0000
committerKarl Berry <karl@freefriends.org>2011-10-19 22:27:29 +0000
commit35f1ce3dcdb68333a18ffee104162b49936c4c26 (patch)
treea592e02cd765c5bc70b5fdcb82b532201fc94922 /Master/texmf-dist/tex/latex/mversion
parentd9e308aa324878bdc4b9099f2ddef6f45399eae9 (diff)
new latex package mversion (19oct11)
git-svn-id: svn://tug.org/texlive/trunk@24330 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/mversion')
-rw-r--r--Master/texmf-dist/tex/latex/mversion/mVersion.sty69
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'.