On 7 May 2011 10:59, Jeroen Demeyer <[email protected]> wrote:
> On 2011-05-06 19:53, Robert Bradshaw wrote:
>> Even better would be to checksum the source in a src.md5 file, and
>> have sage -spgk warn/error if the checksums don't match.
> I think it is necessary and sufficient to checksum the output of "ls -lR".

I would not rely on that, as a different UID or GID on different
systems will give different results.

MD5 would not be good, as different systems have either no program to
compute an md5 checksum, or have them with different names. Although
many systems have a "sum" command, the algorithm will be system
dependant, so that too can't be used.

In contrast, POSIX defines "cksum" so using that as a checksum tool is
preferable.

Something like the following might be workable

drkirkby@laptop:~/sage-4.7.rc0/spkg/standard/singular-3-1-1-4.p8$ find
src -exec cksum {} \; | awk '{print $1}' | cksum | awk '{print $1}'
3766045910


That computes the checksum of each file (using cksum) and then
computes a checksum of the checksums.

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to