www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/08/03/18:30:43

Date: Fri, 3 Aug 2001 18:30:42 -0400
Message-Id: <200108032230.SAA31124@envy.delorie.com>
X-Authentication-Warning: envy.delorie.com: dj set sender to dj AT envy DOT delorie DOT com using -f
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
In-reply-to: <3B6B2541.BC41EDA9@phekda.freeserve.co.uk> (message from Richard
Dawe on Fri, 03 Aug 2001 23:27:13 +0100)
Subject: Re: Running dsmcheck on packages, before upload to Simtel.NET?
References: <3B6B2541 DOT BC41EDA9 AT phekda DOT freeserve DOT co DOT uk>
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> I think it would be a good idea to run 'dsmcheck' on packages that have a
> DSM, before uploading them to Simtel.NET. That way we can catch errors in
> DSMs. Would you mind adding this to your pre-upload checks, DJ? 'dsmcheck'
> builds and runs on Linux - perhaps it will on other Unices too.

Here is my current checkzip script.  If you would send me a patch and
point me at the sources for dsmcheck, I would run it on all zips going
to simtel.

#!/usr/bin/perl
# -*- perl -*-

$| = 1;

unless ($#ARGV >= 0) {
    print "Usage: checkzip foo.zip\n";
    exit 0;
}

for $zip (@ARGV) {

    print "\n\033[33mChecking $zip...\033[0m\n\n";

    $zb = $zip;
    $zb =~ s@.*/@@;
    $zb =~ s/.zip//;

    open(Z, "unzip -l $zip |");
    open(DC, "| doschk | sed -e '/SysV/,/^\$/d'");

    $out = "";
    while (<Z>) {
	next unless / \d+-\d+-\d+ +\d+:\d+ +(\S+)/;
	$f = $1;
	$f =~ s/\^//;

	$manifest = 1 if $f =~ m AT manifest/$zb.mft@;
	$version = 1 if $f =~ m AT manifest/$zb.ver@;

	print DC "$f\n" or 1;

	if ($f =~ /\.(exe|a|o|com|zip)$/i) {
	    $out .= "$f\n";
	}
    }
    close(DC);
    close(Z);

    print "\n$out";

    print "No Manifest (manifest/$zb.mft)\n" unless $manifest;
    print "No Version (manifest/$zb.ver)\n" unless $version;

    system "unzip -tqq $zip";
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019