sbsv1_os/e32toolp/genutil/listzip.pl
branchRCL_3
changeset 39 8c93132f4c49
parent 18 99082257a271
child 76 2b4ec55c802e
equal deleted inserted replaced
35:e5a9edf0be25 39:8c93132f4c49
    30     _print_usage_and_die() if (!$prefix || !$zipf || @junk);
    30     _print_usage_and_die() if (!$prefix || !$zipf || @junk);
    31 
    31 
    32     _print_err_and_die("$prefix is not a directory.") unless -d $prefix;
    32     _print_err_and_die("$prefix is not a directory.") unless -d $prefix;
    33     _print_err_and_die("$zipf doesn't exist.") unless -f $zipf;
    33     _print_err_and_die("$zipf doesn't exist.") unless -f $zipf;
    34 
    34 
       
    35     $prefix =~ s/\/\//\//g;    # SBS provides "Q://", so reduce the doubling
       
    36     $prefix =~ s/\/$//;        # remove trailing /, if any
       
    37 		
    35     my @raw_data = qx/unzip -l $zipf/;
    38     my @raw_data = qx/unzip -l $zipf/;
    36 
    39 
    37     for (@raw_data)
    40     for (@raw_data)
    38     {
    41     {
    39         if ($_ =~ /^\s*\d+\s+\d\d[-|\/]\d\d[-|\/]\d\d\s+\d\d:\d\d\s+(.*)/)
    42         if ($_ =~ /^\s*\d+\s+\d\d[-|\/]\d\d[-|\/]\d\d\s+\d\d:\d\d\s+(.*)/)