bin/118782: [patch] shar(1) sometimes creates broken archives

Edwin Groothuis edwin at mavetju.org
Tue May 27 05:00:08 UTC 2008


The following reply was made to PR bin/118782; it has been noted by GNATS.

From: Edwin Groothuis <edwin at mavetju.org>
To: FreeBSD Gnats Submit <freebsd-gnats-submit at 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 at 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--


More information about the freebsd-bugs mailing list