From f4422c6997bec8c526d88940b223a8d7ae7b392a Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 17 Feb 2005 08:16:32 +0000 Subject: Handle new hdlists format (with sizes) --- gendistrib | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/gendistrib b/gendistrib index 0daa2d4..f51e9a9 100755 --- a/gendistrib +++ b/gendistrib @@ -87,13 +87,16 @@ foreach () { s/\s*#.*$//; /^\s*$/ and next; /^(?:askmedia|suppl)/ and next; - m/^\s*(?:noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ or die "invalid hdlist description \"$_\" in hdlists file"; + my ($name, $dir, $descr) = m/^\s*(?:noauto:)?(hdlist\S*\.cz2?)\s+(\S+)\s*(.*)$/ + or die "invalid hdlist description \"$_\" in hdlists file"; + $descr =~ s/\([^(]+\)\s*$//; #- remove trailing size info + $descr =~ s/\s*$//; push @hdlists, { - synthesis => "$root/media/media_info/synthesis.$1", - hdlist => "$root/media/media_info/$1", - dir => $2, - descr => $3, + synthesis => "$root/media/media_info/synthesis.$name", + hdlist => "$root/media/media_info/$name", + dir => $dir, + descr => $descr, }; } close F; -- cgit v1.2.1