From f631397b28dafed2e4fc8113ecebcfd915359ad1 Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Fri, 4 Jan 2008 02:26:09 +0000 Subject: mk_download_pkg.pl: new file. git-svn-id: svn://tug.org/texlive/trunk@6032 c570f23f-e606-0410-a88d-b1316a301751 --- Master/tlpkg/bin/mk_download_pkg.pl | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Master/tlpkg/bin/mk_download_pkg.pl (limited to 'Master/tlpkg') diff --git a/Master/tlpkg/bin/mk_download_pkg.pl b/Master/tlpkg/bin/mk_download_pkg.pl new file mode 100644 index 00000000000..6853cd756ec --- /dev/null +++ b/Master/tlpkg/bin/mk_download_pkg.pl @@ -0,0 +1,43 @@ +#!/usr/bin/env perl +$^W=1; + +# $Id: $ +# mk_download_pkg.pl +# +# Copyright 2008 Reinhard Kotucha +# This file is licensed under the GNU General Public License version 2 +# or any later version. + +# mk_download_pkg.pl is supposed to create the file "install-tl.zip" +# is needed for network downloads. Currently it doesn't do anything +# useful but it converts wildcards to regular expressions. + +while () { + next if /^\s+$/; + next if /\s*\#/; + chomp ($_); + if (/\/$/) { + print "$_ is a directory.\n"; + } else { + ($dir, $file)=/^(.*)\/(.*)/; + $_=$file; + s/\./\\./g; + s/(\*)/\.$1/g; + $re_file=$_; + } + + opendir DIR, "$dir"; + foreach my $f (readdir (DIR)) { + if ("$f" =~ /^$re_file$/) { + print "$f\n"; + } + } + close DIR; +} + +__DATA__ +tlpkg/bin/lzma*.* +tlpkg/bin/*tar* +tlpkg/bin/perl* +tlpkg/bin/wget.exe +tlpkg/lib/ -- cgit v1.2.3