From a3820a32b1f8c604520d9fcf34069b4e0a73a89a Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 5 Dec 2011 00:23:53 +0000 Subject: mkjobtexmf 0.8 (11nov11) git-svn-id: svn://tug.org/texlive/trunk@24758 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/generic/mkjobtexmf/README | 9 +- .../doc/generic/mkjobtexmf/clean-case.pl | 20 ++ .../doc/generic/mkjobtexmf/mkjobtexmf.html | 223 ++++++++++++++------- .../doc/generic/mkjobtexmf/mkjobtexmf.ltx | 68 ++++++- .../doc/generic/mkjobtexmf/mkjobtexmf.pdf | Bin 107944 -> 59871 bytes .../doc/generic/mkjobtexmf/mkjobtexmf.txt | 102 +++++++--- .../texmf-dist/doc/generic/mkjobtexmf/version.pl | 144 +++++++++++++ 7 files changed, 454 insertions(+), 112 deletions(-) create mode 100644 Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl create mode 100644 Master/texmf-dist/doc/generic/mkjobtexmf/version.pl (limited to 'Master/texmf-dist/doc/generic') diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/README b/Master/texmf-dist/doc/generic/mkjobtexmf/README index 7e454af1582..e09a30f1822 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/README +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/README @@ -1,6 +1,6 @@ -README for mkjobtexmf 2008/06/28 v0.7 +README for mkjobtexmf 2011/11/10 v0.8 -Copyright 2007, 2008 by Heiko Oberdiek +Copyright 2007, 2008, 2011 by Heiko Oberdiek License ======= @@ -45,4 +45,9 @@ Installation Install them where you find them, for example in directory: /usr/local/share/doc/mkjobtexmf/ +The files clean-case.pl and version.pl are just helper scripts for +generating the documentation and are provided for sake of completeness. +They are usually not needed, because the documentation files are +already generated and provided in the distribution. + See the documentation for further information. diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl b/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl new file mode 100644 index 00000000000..fe72e184d02 --- /dev/null +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/clean-case.pl @@ -0,0 +1,20 @@ +#!/usr/bin/env perl +use strict; +$^W=1; + +@ARGV == 2 or die "!!! Syntax: \n"; + +my $infile = $ARGV[0]; +my $outfile = $ARGV[1]; + +open(IN, '<', $infile) or die "!!! Error: Cannot open `$infile'!\n"; +open(OUT, '>', $outfile) or die "!!! Error: Cannot write `$outfile'!\n"; +while () { + s/^(=head[1] [A-Z])(.*)/$1\L$2\E/; + s/(L<"[A-Z])([^"]+)">/$1\L$2\E">/g; + print OUT; +} +close(IN); +close(OUT); + +__END__ diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html index 8cd658d49de..ed760662e1c 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.html @@ -1,7 +1,7 @@ -mkjobtexmf -- Generate a texmf tree for a particular job +mkjobtexmf @@ -12,9 +12,10 @@

-

NAME

+

Name

mkjobtexmf -- Generate a texmf tree for a particular job


-

SYNOPSIS

+

Version

+

2011-11-10 v0.8

+

+

+
+

Synopsis

The progam mkjobtexmf runs a program and tries to find the used file names. Two methods are available, option -recorder of TeX (Web2C) or the program strace.

@@ -73,22 +79,25 @@ instead of TeX. As method only program strace is available.

symbol links --flat Junk paths, do not make directories inside the destination directory + --(no)texhash Run texhash, use --notexhash for MiKTeX + --exclude-ext <ext> Exclude files with extension <ext>. --cmd-tex <cmd> Command for the TeX compiler --cmd-kpsewhich <cmd> Command for kpsewhich --cmd-texhash <cmd> Command for texhash --cmd-strace <cmd> Command for strace --verbose Verbose output --help Brief help message - --man Full documentation + --man Full documentation + --version Print version identification


-

DESCRIPTION

+

Description

Running the program

First mkjobtexmf runs a program, usually TeX. The TeX compiler -is configured by option --cmd-tex. Option --texname can +is configured by option --cmd-tex. Option --texname can be used, if the file name extension differs from .tex:

     mkjobtexmf --jobname foo --texname foo.ltx
@@ -132,34 +141,34 @@ a relative file name, then it is directly linked/copied into the result directory jobname.mjt. Absolute file names are not supported and neither paths with links to parent directories.

Symbolic links are created by default. The files are copied -if option --copy is given or symbolic linking is not available.

+if option --copy is given or symbolic linking is not available.


-

OPTIONS

+

Options

-
--jobname=jobname
+
--jobname=<jobname>
-It is the name of the job. `<jobname>.tex' serves as default for -the TeX file and <jobname> is used for naming various directories -and files. See section FILES. +It is the name of the job. `<jobname>.tex' serves as default for +the TeX file and <jobname> is used for naming various directories +and files. See section Files.

-
--texname=name
+
--texname=<name>
-The name of the TeX input file, if it differs from <jobname>.tex. +The name of the TeX input file, if it differs from <jobname>.tex.

-
--texopt=opt
+
--texopt=<opt>
-Additional option for the TeX compiler, examples are --ini or ---shell-escape. This option can be given more than once. +Additional option for the TeX compiler, examples are --ini or +--shell-escape. This option can be given more than once.

-
--destdir=directory
+
--destdir=<directory>
Specifies the name of the destination directory where the result @@ -167,25 +176,25 @@ is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'.

-
--output
+
--output
Also add output files.

-
--strace
+
--strace
-Use method with program strace, see DESCRIPTION. +Use method with program strace, see Description.

-
--copy
+
--copy
Files are copied instead of creating symbolic links.

-
--flat
+
--flat
Files are linked or copied without path elements. @@ -196,47 +205,88 @@ files or links without directory.

The files `ls-R' and `aliases' are ignored.

-
--cmd-tex=cmd
+
--exclude-ext=<ext>
+
+
+Files with extension <ext> are excluded. The option can be +given several times or a comma separated list of extensions +can be used. Examples: +
+
+
+    --exclude-ext aux --exclude-ext log --exclude-ext toc
+
+
+

is the same as

+
+
+
+    --exclude-ext aux,log,toc
+
+

+
--(no)texhash
+
+
+As default the file `ls-R' is generated in the `texmf' tree, +because this is the file name database that might be used +in TeX Live. Because MiKTeX uses a different mechanism, its +`texhash' does not generate the `ls-R' files and --notexhash +suppresses the call of `texhash'. +
+

+
--cmd-tex=<cmd>
Command for the TeX compiler. Default is pdflatex.

-
--cmd-kpsewhich=cmd
+
--cmd-kpsewhich=<cmd>
Command for kpsewhich.

-
--cmd-texhash=cmd
+
--cmd-texhash=<cmd>
Command for updating the file name database of the generated texmf tree. Default is texmf.

-
--cmd-strace=cmd
+
--cmd-strace=<cmd>
Command for strace.

-
--verbose
+
--verbose
Verbose messages.

-
--help
+
--help
Display help screen.
+

+
-B(-man>
+
+
+Print manual page. +
+

+
--version
+
+
+Print version identification and exit. +


-

EXAMPLES

+

Examples

TeX file test.tex using TeX's recorder method:

     mkjobtexmf --jobname test
@@ -258,7 +308,7 @@ Display help screen.


-

UNSOLVED ISSUES, CAVEATS, TODOS

+

Unsolved issues, caveats, todos

Experimental software
@@ -318,13 +368,13 @@ file recording (e.g. pdfTeX 1.40.3 does not record .pfb and


-

FILES

+

Files

<jobname>.mjt/
Directory where the resulting texmf tree and symbol links -are stored. It can be changed by option --destdir. +are stored. It can be changed by option --destdir.

<jobname>.fls
@@ -342,53 +392,82 @@ Log file where the result of strace is stored.


-

AUTHOR

-

Heiko Oberdiek, email: oberdiek at uni-freiburg.de

+

Author

+

Heiko Oberdiek, email: heiko.oberdiek at googlemail.com


-

COPYRIGHT AND LICENSE

-

Copyright 2007 by Heiko Oberdiek.

+

Copyright and license

+

Copyright 2007, 2008, 2011 by Heiko Oberdiek.

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself (Perl Artistic License/GNU General Public License, version 2).


-

HISTORY

+

History

    -
  1. /04/16 v0.1
    +
  2. 2007/04/16 v0.1
  3. -* First experimental version. -

    -
  4. /05/09 v0.2
    + +
  5. 2007/05/09 v0.2
  6. -* New options: --copy, --flat, --destdir -

    -
  7. /09/04 v0.4
    + +
  8. 2007/09/03 v0.3
    +
  9. + +
  10. 2007/09/04 v0.4
  11. -* Support for `configure' added. + +
  12. 2007/09/06 v0.5
    +
  13. + +
  14. 2008/04/05 v0.6
  15. -* Fix for unknown option `--cmd-strace'. - (Thanks to Juho Niemel``a) -

+ +
  • 2008/06/28 v0.7
    +
  • + +
  • 2011/11/10 v0.8
    +
  • + + diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx index 7127c9efa81..bbb70e9ebf4 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.ltx @@ -1,19 +1,59 @@ % mkjobtexmf.ltx % -% Copyright 2007, 2008 by Heiko Oberdiek. +% Copyright 2007, 2008, 2011 by Heiko Oberdiek. % % The file is part of project mkjobtexmf. % It's free software; you may redistribute it and/or % modify it under the same terms as Perl itself % (Perl Artistic License/GNU General Public License, version 2). -\documentclass[a4paper]{article} +\documentclass[a4paper,12pt]{article} -\providecommand*{\DATE}{2008/06/28} -\providecommand*{\VERSION}{0.7} +\providecommand*{\DATE}{2011/11/10} +\providecommand*{\VERSION}{0.8} + +\usepackage[ + hmargin=1in, + top=.75in, + bottom=.5in, + includefoot, + headheight=14.5pt, + footskip=40pt, +]{geometry} + +\usepackage{fancyhdr} +\renewcommand*{\headrulewidth}{0pt} +\renewcommand*{\footrulewidth}{0.4pt} +\fancyhead{} +\fancyfoot[L]{\textsf{mkjobtexmf}} +\fancyfoot[C]{\DATE\ v\VERSION} +\fancyfoot[R]{\thepage} +\pagestyle{fancy} +\makeatletter +\let\ps@plain\ps@fancy +\makeatother + +\makeatletter +\renewenvironment*{theindex}{% + \section*{\indexname}% + \setlength{\parindent}{0pt}% + \setlength{\parskip}{0pt plus .3pt}% + \let\item\@idxitem +}{% + \clearpage +} +\makeatother + +\usepackage{ifluatex} +\ifluatex + \usepackage{fontspec} +\else + \usepackage[T1]{fontenc}% + \usepackage{lmodern}% + \usepackage[utf8]{inputenc}% +\fi \usepackage{makeidx} -\makeindex \usepackage{hyperref} \hypersetup{ @@ -21,21 +61,23 @@ pdfauthor={Heiko Oberdiek}, pdftitle={mkjobtexmf}, } +\definecolor{linkcolor}{rgb}{0,0,.8} +\hypersetup{ + linkcolor=linkcolor, +} \usepackage{bookmark} \bookmarksetup{ open, + numbered, } +\makeindex + \author{Heiko Oberdiek} \title{Program \textsf{mkjobtexmf}} \date{\DATE\space v\VERSION} -\makeatletter -\let\org@section\section -\def\section{\@ifstar\org@section\org@section} -\makeatother - % ignore minor overfull \hbox warnings \setlength{\hfuzz}{1.5pt} @@ -43,8 +85,14 @@ \maketitle +\pdfbookmark[1]{\contentsname}{toc} \tableofcontents +\makeatletter +\let\org@section\section +\def\section{\@ifstar\org@section\org@section} +\makeatother + \input{mkjobtexmf.tex} \printindex diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf index 13e63f00450..0a75e81aae1 100644 Binary files a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf and b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.pdf differ diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt index b091141ec1b..e64edeec071 100644 --- a/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/mkjobtexmf.txt @@ -2,6 +2,10 @@ NAME mkjobtexmf -- Generate a texmf tree for a particular job +VERSION + + 2011-11-10 v0.8 + SYNOPSIS The progam mkjobtexmf runs a program and tries to find the used file @@ -40,6 +44,8 @@ SYNOPSIS symbol links --flat Junk paths, do not make directories inside the destination directory + --(no)texhash Run texhash, use --notexhash for MiKTeX + --exclude-ext Exclude files with extension . --cmd-tex Command for the TeX compiler --cmd-kpsewhich Command for kpsewhich --cmd-texhash Command for texhash @@ -47,13 +53,14 @@ SYNOPSIS --verbose Verbose output --help Brief help message --man Full documentation + --version Print version identification DESCRIPTION Running the program First mkjobtexmf runs a program, usually TeX. The TeX compiler is - configured by option --cmd-tex. Option --texname can be used, if the + configured by option "--cmd-tex". Option "--texname" can be used, if the file name extension differs from .tex: mkjobtexmf --jobname foo --texname foo.ltx @@ -93,23 +100,23 @@ DESCRIPTION with links to parent directories. Symbolic links are created by default. The files are copied if option - --copy is given or symbolic linking is not available. + "--copy" is given or symbolic linking is not available. OPTIONS - --jobname=*jobname* - It is the name of the job. `.tex' serves as default for the - TeX file and is used for naming various directories and - files. See section "FILES". + --jobname=<*jobname*> + It is the name of the job. `<*jobname*>.tex' serves as default for + the TeX file and <*jobname*> is used for naming various directories + and files. See section "FILES". - --texname=*name* - The name of the TeX input file, if it differs from .tex. + --texname=<*name*> + The name of the TeX input file, if it differs from <*jobname*>.tex. - --texopt=*opt* - Additional option for the TeX compiler, examples are --ini or - --shell-escape. This option can be given more than once. + --texopt=<*opt*> + Additional option for the TeX compiler, examples are "--ini" or + "--shell-escape". This option can be given more than once. - --destdir=*directory* + --destdir=<*directory*> Specifies the name of the destination directory where the result is collected. As default a directory is generated in the current directory with the job name and extension `.mjt'. @@ -130,17 +137,35 @@ OPTIONS The files `ls-R' and `aliases' are ignored. - --cmd-tex=*cmd* + --exclude-ext=<*ext*> + Files with extension <*ext*> are excluded. The option can be given + several times or a comma separated list of extensions can be used. + Examples: + + --exclude-ext aux --exclude-ext log --exclude-ext toc + + is the same as + + --exclude-ext aux,log,toc + + --(no)texhash + As default the file `ls-R' is generated in the `texmf' tree, because + this is the file name database that might be used in TeX Live. + Because MiKTeX uses a different mechanism, its `texhash' does not + generate the `ls-R' files and "--notexhash" suppresses the call of + `texhash'. + + --cmd-tex=<*cmd*> Command for the TeX compiler. Default is pdflatex. - --cmd-kpsewhich=*cmd* + --cmd-kpsewhich=<*cmd*> Command for kpsewhich. - --cmd-texhash=*cmd* + --cmd-texhash=<*cmd*> Command for updating the file name database of the generated texmf tree. Default is texmf. - --cmd-strace=*cmd* + --cmd-strace=<*cmd*> Command for strace. --verbose @@ -149,6 +174,12 @@ OPTIONS --help Display help screen. + -B(-man> + Print manual page. + + --version + Print version identification and exit. + EXAMPLES TeX file test.tex using TeX's recorder method: @@ -215,7 +246,7 @@ FILES .mjt/ Directory where the resulting texmf tree and symbol links are - stored. It can be changed by option --destdir. + stored. It can be changed by option "--destdir". .fls Name of TeX's recorder file. @@ -225,11 +256,11 @@ FILES AUTHOR - Heiko Oberdiek, email: oberdiek at uni-freiburg.de + Heiko Oberdiek, email: heiko.oberdiek at googlemail.com COPYRIGHT AND LICENSE - Copyright 2007 by Heiko Oberdiek. + Copyright 2007, 2008, 2011 by Heiko Oberdiek. This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself (Perl Artistic License/GNU General @@ -238,25 +269,40 @@ COPYRIGHT AND LICENSE HISTORY 2007/04/16 v0.1 - * First experimental version. + + * First experimental version. 2007/05/09 v0.2 - * Typo in option name fixed. + + * Typo in option name fixed. 2007/09/03 v0.3 - * New options: --copy, --flat, --destdir + + * New options: "--copy", "--flat", "--destdir" 2007/09/04 v0.4 - * Bug fix in map_files_texmf. + + * Bug fix in map_files_texmf. 2007/09/06 v0.5 - * Support for `configure' added. (Thanks to Norbert Preining for - writing a first version of the configure stuff.) + + * Support for `configure' added. (Thanks to Norbert Preining for + writing a first version of the configure stuff.) 2008/04/05 v0.6 - * Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to - Karl Berry) + + * Tiny fix in target `uninstall' in file `Makefile.in'. (Thanks to + Karl Berry) 2008/06/28 v0.7 - * Fix for unknown option `--cmd-strace'. (Thanks to Juho Niemel"a) + + * Fix for unknown option `"--cmd-strace"'. (Thanks to Juho Niemelä) + + 2011/11/10 v0.8 + + * Remove colon from drive specification when making directories. + * Option "--(no)texhash" added. + * Some support for MiKTeX (thanks Ulrike Fischer). + * Various fixes in the generation of the documentation. + * Options "--exclude-ext" and "--version" added. diff --git a/Master/texmf-dist/doc/generic/mkjobtexmf/version.pl b/Master/texmf-dist/doc/generic/mkjobtexmf/version.pl new file mode 100644 index 00000000000..84223030c74 --- /dev/null +++ b/Master/texmf-dist/doc/generic/mkjobtexmf/version.pl @@ -0,0 +1,144 @@ +#!/usr/bin/env perl +use strict; +$^W=1; + +my $infile = 'mkjobtexmf.pl'; +my $acfile = 'configure.ac'; +my $ltxfile = 'mkjobtexmf.ltx'; +my $readmefile = 'README'; +my $datefile = 'date-version.txt'; +my $tmpfile = "version.tmp"; + +my $date = ''; +my $version = ''; +my $copyright_years = ''; +my $pl_date_version = ''; + +open(IN, '<', $infile) or die "!!! Error: Cannot open `$infile'!\n"; +while () { + if (/my \$date\s*=\s*'([0-9\/]+)'/) { + $date = $1; + next; + } + if (/my \$version\s*=\s*'([0-9\.]+)'/) { + $version = $1; + next; + } + if (/my \$copyright\s*=\s*"Copyright (.*) \$author"/) { + $copyright_years = $1; + next; + } + if (/^(\d{4}-\d{2}-\d{2} v\d+\.\d+)\s*$/) { + $pl_date_version = $1; + next; + } +} + +$date or die "!!! Error: Date not found!\n"; +$version or die "!!! Error: Version not found!\n"; +$copyright_years or die "!!! Error: Copyright years not found!\n"; +my $isodate = $date; +$isodate =~ s|/|-|g; +my $date_version = "$isodate v$version"; +$pl_date_version or die "!!! Error: VERSION/POD not found!\n"; +$pl_date_version eq $date_version or die "!!! Error: Fix VERSION in pod section!\n"; + +open(OUT, '>', $tmpfile) or die "!!! Error: Cannot open `$tmpfile'!\n"; +open(IN, '<', $acfile) or die "!!! Error: Cannot open `$acfile'!\n"; +my $found = 0; +my $update = 0; +while () { + if (/^(dnl Copyright )(.*)( by .*)$/) { + $found |= 1; + $_ = "$1$copyright_years$3\n"; + $update = 1 unless $2 eq $copyright_years; + } + if (/^(AC_INIT\(mkjobtexmf, )([^,]*)(,.*|\).*)$/) { + $found |= 2; + $_ = "$1$version$3\n"; + $update = 1 unless $2 eq $version; + } + print OUT; +} +die "!!! Error: COPYRIGHT or AC_INIT line not found!\n" unless $found = 3; +unlink $acfile or die "!!! Error: Cannot delete `$acfile'!\n"; +rename $tmpfile, $acfile + or die "!!! Error: Cannot rename `$tmpfile' to `$acfile'!\n"; +print "--> `$acfile' updated\n" if $update; + +open(OUT, '>', $tmpfile) or die "!!! Error: Cannot open `$tmpfile'!\n"; +open(IN, '<', $ltxfile) or die "!!! Error: Cannot open `$ltxfile'!\n"; +$found = 0; +$update = 0; +while () { + if (/^(% Copyright )(.*)( by .*)$/) { + $found |= 1; + $_ = "$1$copyright_years$3\n"; + $update = 1 unless $2 eq $copyright_years; + } + if (/^(\\providecommand\*{\\DATE}{)(.*)(})$/) { + $found |= 2; + $_ = "$1$date$3\n"; + $update = 1 unless $2 eq $date; + } + if (/^(\\providecommand\*{\\VERSION}{)(.*)(})$/) { + $found |= 4; + $_ = "$1$version$3\n"; + $update = 1 unless $2 eq $version; + } + print OUT; +} +close(IN); +close(OUT); +die "!!! Error: COPYRIGHT or DATE or VERSION line not found!\n" + unless $found == 7; +unlink $ltxfile or die "!!! Error: Cannot delete `$ltxfile'!\n"; +rename $tmpfile, $ltxfile + or die "!!! Error: Cannot rename `$tmpfile' to `$ltxfile'!\n"; +print "--> `$ltxfile' updated\n" if $update; + +open(OUT, '>', $tmpfile) or die "!!! Error: Cannot open `$tmpfile'!\n"; +open(IN, '<', $readmefile) or die "!!! Error: Cannot open `$readmefile'!\n"; +$found = 0; +$update = 0; +while () { + if (/^(Copyright )(.*)( by .*)$/) { + $found |= 1; + $_ = "$1$copyright_years$3\n"; + $update = 1 unless $2 eq $copyright_years; + } + if (/^(README for mkjobtexmf )([0-9\/]+) v([0-9\.]+)$/) { + $found |= 2; + $_ = "$1$date v$version\n"; + $update = 1 unless $2 eq $date and $3 eq $version; + } + print OUT; +} +close(IN); +close(OUT); +die "!!! Error: COPYRIGHT or DATE/VERSION line not found!\n" + unless $found == 3; +unlink $readmefile or die "!!! Error: Cannot delete `$readmefile'!\n"; +rename $tmpfile, $readmefile + or die "!!! Error: Cannot rename `$tmpfile' to `$readmefile'!\n"; +print "--> `$readmefile' updated.\n" if $update; + +my $old_date_version = ''; +if (-f $datefile) { + open(IN, '<', $datefile) or die "!!! Error: Cannot open `$datefile'!\n"; + my @lines = ; + $old_date_version = "@lines"; + close(IN); +} +if ($old_date_version eq $date_version) { + # print "--> `$datefile' is already uptodate.\n"; +} +else { + open(OUT, '>', $datefile) or die "!!! Error: Cannot open `$datefile'!\n"; + print OUT $date_version; + close(OUT); + print "--> `$datefile' updated.\n"; +} + +1; +__END__ -- cgit v1.2.3