Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 27 May 2008 05:00:07 GMT
From:      Edwin Groothuis <edwin@mavetju.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/118782: [patch] shar(1) sometimes creates broken archives
Message-ID:  <200805270500.m4R507PR048552@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/118782; it has been noted by GNATS.

From: Edwin Groothuis <edwin@mavetju.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit@freebsd.org>
Cc:  
Subject: Re: bin/118782: [patch] shar(1) sometimes creates broken archives
Date: Tue, 27 May 2008 14:51:38 +1000

 --OXfL5xGRrasGEqWY
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 This patch will make the output consistent by using md5 for everything
 (yes I just got bitten by the "create patch before checking gnats" bug)
 
 -- 
 Edwin Groothuis      |            Personal website: http://www.mavetju.org
 edwin@mavetju.org    |              Weblog: http://www.mavetju.org/weblog/
 
 --OXfL5xGRrasGEqWY
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename=a
 
 ? shar.1.gz
 Index: shar.sh
 ===================================================================
 RCS file: /home/ncvs/src/usr.bin/shar/shar.sh,v
 retrieving revision 1.3
 diff -u -r1.3 shar.sh
 --- shar.sh	29 Aug 1997 00:44:34 -0000	1.3
 +++ shar.sh	27 May 2008 04:50:44 -0000
 @@ -70,10 +70,12 @@
  		echo "echo c - $i"
  		echo "mkdir -p $i > /dev/null 2>&1"
  	else
 +		md5sum=`echo -n $i | md5`
 +		eofmarker="END-of-$md5sum"
  		echo "echo x - $i"
 -		echo "sed 's/^X//' >$i << 'END-of-$i'"
 +		echo "sed 's/^X//' >$i << '$md5sum'"
  		sed 's/^/X/' $i || exit
 -		echo "END-of-$i"
 +		echo "$md5sum"
  	fi
  done
  echo exit
 
 --OXfL5xGRrasGEqWY--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805270500.m4R507PR048552>