%%
%% 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}
    [2013/03/11 v1.0.1 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'.
