summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-06-25 21:50:47 +0000
committerKarl Berry <karl@freefriends.org>2017-06-25 21:50:47 +0000
commita3d3b206eb2e58da4e00d07576e32c5bd9acbf69 (patch)
tree313d64a4fdbe9c168e5e210aedfd13312e6a1f44 /Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
parent00305c9e9703b6a03efb295fc20c04be6a65d447 (diff)
latexindent (25jun17)
git-svn-id: svn://tug.org/texlive/trunk@44695 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm')
-rw-r--r--Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm15
1 files changed, 12 insertions, 3 deletions
diff --git a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
index 336ec34c7ad..fb7cb37ed00 100644
--- a/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
+++ b/Master/texmf-dist/scripts/latexindent/LatexIndent/LogFile.pm
@@ -18,6 +18,7 @@ use strict;
use warnings;
use LatexIndent::GetYamlSettings qw/%masterSettings/;
use LatexIndent::Switches qw/%switches/;
+use LatexIndent::Version qw/$versionNumber $versionDate/;
use FindBin;
use File::Basename; # to get the filename and directory path
use Exporter qw/import/;
@@ -41,17 +42,25 @@ sub processSwitches{
my $self = shift;
# details of the script to log file
- $self->logger("$FindBin::Script version 3.2, a script to indent .tex files",'heading');
+ $self->logger("$FindBin::Script version $versionNumber, $versionDate, a script to indent .tex files",'heading');
$self->logger("$FindBin::Script lives here: $FindBin::RealBin/");
# time the script is used
my $time = localtime();
$self->logger("$time");
+ # -v switch is just to show the version number
+ if($switches{version}) {
+ print $versionNumber,", ",$versionDate,"\n";
+ exit(2);
+ }
+
if(scalar(@ARGV) < 1 or $switches{showhelp}) {
print <<ENDQUOTE
-latexindent.pl version 3.2
+latexindent.pl version $versionNumber, $versionDate
usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
+ -v, --version
+ displays the version number and date of release
-h, --help
help (see the documentation for detailed instructions and examples)
-o, --outputfile
@@ -72,7 +81,7 @@ usage: latexindent.pl [options] [file][.tex|.sty|.cls|.bib|...]
latexindent.pl -l=some.yaml,another.yaml myfile.tex
-d, --onlydefault
ONLY use defaultSettings.yaml, ignore ALL (yaml) user files
- -g, --logfile
+ -g, --logfile=<name of log file>
used to specify the name of logfile (default is indent.log)
-c, --cruft=<cruft directory>
used to specify the location of backup files and indent.log