[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: md5sum not being involked in recent sharutils
From: |
Bruce Korb |
Subject: |
Re: md5sum not being involked in recent sharutils |
Date: |
Fri, 4 Nov 2005 08:55:16 -0800 |
User-agent: |
KMail/1.7.1 |
Hi Jay,
On Friday 04 November 2005 01:44 am, jayjwa wrote:
> Earlier
> versions of md5sum may have matched this, as the problem didn't occur
> with sharutils & coreutils in the versions before the ones referenced
> here.
Before I started playing with it, md5sum only worked with a version of
it that was a decade old. :) In other words, it hasn't been working
for a decade, so then it did and now it doesn't. Thanks for pointing it out.
> Since the functionality is the same, prehaps checking for something in
> the version strings would work better, for all versions.
You are right. I just used the same mechanism that was there before,
only updated it for something that seemed more flexible. It is, but
not enough.
> md5sum (GNU coreutils) 5.92
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software. You may redistribute copies of it under the terms of
> the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
> There is NO WARRANTY, to the extent permitted by law.
>
> Written by Ulrich Drepper and Scott Miller.
My version:
> md5sum (coreutils) 5.2.1
> Written by Ulrich Drepper and Scott Miller.
>
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> In order for the test to work now, the string would need to be:
>
> if echo "${f}" | \
> grep 'c, --check.*read MD5 sums from the FILEs and check them' >/dev/null
which would fail with an older installation. Not good, either.
This should be sufficient, and *much* simpler:
MD5SUM=${MD5SUM-md5sum}
f=`${MD5SUM} --version | egrep '^md5sum .*coreutils'`
test -n "${f}" && md5check=true || md5check=false
Thanks - Bruce