Sha256: 9e036219ab2e89a46aa163d6e555805acf1fb0ed462f1e6822658e4277807013

Contents?: true

Size: 973 Bytes

Versions: 8

Compression:

Stored size: 973 Bytes

Contents

#!/usr/bin/perl -w
# put extract.exe (or a link to it) into this directory
# for this script to work

use strict;
use File::Temp qw(tempdir);
use Cwd qw(cwd);

my $extract = $0; $extract =~ s{[^/]+$}{extract.exe};
my $HDR1 = 'Microsoft (R) Diamond Extraction Tool';
my $HDR2 = 'Copyright (c) Microsoft Corp';

my $dir = tempdir("./.tempXXXX", CLEANUP => 1) . '/extradir';
mkdir $dir;
$ENV{LANG} = 'C';

for my $cab (@ARGV) {
    my @files;
    print "*** $cab\n";
    for (`wine $extract /y /a /e /l $dir $cab 2>&1`) {
        s/\015?\012$//s; # remove line endings
        next if /^(\Q$HDR1\E|\Q$HDR2\E|\s*$| Cabinet )/;
        if (/^Extracting \Q$dir\E\\(.+)$/) {
	    my $file = $1;
            $file =~ s{\\}{/}g;
            $file =~ s{^/+}{};
            push @files, $file;
        }
        else {
            print STDERR "$_\n";
        }
    }

    next unless @files;
    my $olddir = cwd();
    chdir $dir;
    system 'md5sum', @files;
    chdir $olddir;
}

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
metanorma-cli-1.3.4 gems/ruby/2.6.0/gems/libmspack-0.1.0/ext/libmspack/test/msexpand_md5
metanorma-cli-1.3.3.1 gems/ruby/2.6.0/gems/libmspack-0.1.0/ext/libmspack/test/msexpand_md5
libmspack-0.1.0 ext/libmspack/test/msexpand_md5
libmspack-0.0.5 ext/libmspack/test/msexpand_md5
libmspack-0.0.4 ext/libmspack/test/msexpand_md5
libmspack-0.0.3 ext/libmspack/test/msexpand_md5
libmspack-0.0.2 ext/libmspack/test/msexpand_md5
libmspack-0.0.1 ext/libmspack/test/msexpand_md5