Subject: Re: [GUILT] [PATCH] Fix fatal "guilt graph" error in sha1sum invocation.

From: Andreas Schwab <[email-masked]>
Date: Wed, 14 Mar 2012 15:27:23 +0100

Per Cederqvist <[email-masked]> writes:

> -	openssl dgst -sha1 "$1" | sed "s,SHA1.\(.*\).= \(.*\),\2  \1,"
> +	if [ $# = 1 ]
> +	then
> +		openssl dgst -sha1 "$1" | sed "s,SHA1.\(.*\).= \(.*\),\2  \1,"
> +	else
> +		openssl dgst -sha1 | sed 's,$,  -,'

$ openssl dgst -sha1 </dev/null
(stdin)= da39a3ee5e6b4b0d3255bfef95601890afd80709

>  # usage: sha1 [file]
>  sha1()
>  {
> -	sha1sum "$1"
> +	if [ $# = 1 ]
> +	then
> +		sha1sum "$1"
> +	else
> +		sha1sum
> +	fi

        sha1sum "$@"

Andreas.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."