From aa7b0648ffd87636e520e2dc7363189f2695a7b8 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 28 Jul 2003 23:00:56 +0000 Subject: Fixes based on Gisle Vanem's input since this script failed due to possibly crlf newlines. --- src/mkhelp.pl | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/mkhelp.pl b/src/mkhelp.pl index 731f6598f..2e1e6985a 100644 --- a/src/mkhelp.pl +++ b/src/mkhelp.pl @@ -6,6 +6,12 @@ # THEY DON'T FIT ME :-) # Get readme file as parameter: + +if($ARGV[0] eq "-c") { + $c=1; + shift @ARGV; +} + my $README = $ARGV[0]; if($README eq "") { @@ -20,6 +26,7 @@ push @out, " / __| | | | |_) | | \n"; push @out, " | (__| |_| | _ <| |___ \n"; push @out, " \\___|\\___/|_| \\_\\_____|\n"; +my $olen=0; while () { my $line = $_; @@ -70,16 +77,19 @@ close(READ); if($c) { my @test = `gzip --version 2>&1`; if($test[0] =~ /gzip/) { - open(GZIP, "|gzip -9 >dumpit.gz") || - die "can't run gzip, try without -c"; + open(GZIP, ">dumpit") || + die "can't create the dumpit file, try without -c"; binmode GZIP; for(@out) { print GZIP $_; $gzip += length($_); } close(GZIP); + + system("gzip --best --no-name dumpit"); - open(GZIP, ") { push @gzip, $_; -- cgit v1.2.3