From 6284b783bd560342558b44932a2db9912e90678e Mon Sep 17 00:00:00 2001 From: Michael Kohlhase Date: Fri, 20 Nov 2015 12:12:26 +0100 Subject: [PATCH] draining just to be sure for CTAN distribution --- bin/filedate | 45 +++++++++++++++++++++++++++++++++++++++++++++ lib/Makefile.ctan | 4 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) create mode 100755 bin/filedate diff --git a/bin/filedate b/bin/filedate new file mode 100755 index 0000000..6ea1a5d --- /dev/null +++ b/bin/filedate @@ -0,0 +1,45 @@ +#!/usr/bin/perl -w +####################################################################################### +# A tool for updating .dtx files with a given package date. # +# Copyright (c) 2010, Deyan Ginev, released under the Gnu General Public License (GPL)# +# see http://www.gnu.org/copyleft/gpl.html # +# $URL: https://svn.kwarc.info/repos/stex/trunk/bin/filedate$ # +####################################################################################### + +use strict; + +use Getopt::Long; +use Modparse; +use Pod::Usage; +use Cwd qw(abs_path); + +my ($file) = @ARGV; +my $date = `svn info $file`; +$date =~ /Last Changed Date: (\d+)-(\d+)-(\d+)/; +$date = $1.'/'.$2.'/'.$3; +$file = abs_path($file); +open(IN,"<$file"); +my @lines = (); +while () { + if ($_ =~ /\\Provides(Package|Class)/) { + $_ =~ s/\[(.*?)\s/\[$date /; + } + push @lines, $_; +} +close(IN); +open(OUT,">$file"); +print OUT join("",@lines); +close(OUT); + +__END__ + + +=head1 SYNOPSIS + +filedate + +Purpose: + Update the dates for a \ProvidePackage invocation in a given .dtx source + +Example: + filedate omdoc.dtx diff --git a/lib/Makefile.ctan b/lib/Makefile.ctan index 2afa775..6b5c150 100644 --- a/lib/Makefile.ctan +++ b/lib/Makefile.ctan @@ -18,7 +18,7 @@ HERE = $(shell pwd) TMP = /tmp -TDSCOLL = proposal +TDSCOLL ?= $(shell basename $$PWD) EXPORTED = $(TMP)/$(TDSCOLL).exp TDSDIR = $(TMP)/$(TDSCOLL).tds TDSZIP = $(TMP)/$(TDSCOLL).tds.zip @@ -31,7 +31,7 @@ MAKE = make # the filedates and the checksums. To get rid of all the junk we commit and # export a clean copy EXPORTED, on which we run the target ctanexp below, # which generates a directory CTANDIR, which we zip and move into place. -ctan: all # filedate checksum +ctan: all #filedate checksum git commit -am'draining just to be sure for CTAN distribution' rm -Rf $(EXPORTED) @echo "exporting a clean copy to $(EXPORTED)"