diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-05-13 20:55:31 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-05-13 20:55:31 -0400 |
commit | 38cadace5bc6f9e62f7d91f14bf1d9fa6da2cd23 (patch) | |
tree | 4c2086cb539b480afb624a91c0404bdfe4962057 /tools/checksum.py | |
parent | c151b3bf755c7dcdadd38500138f66de8a731578 (diff) | |
download | seabios-hppa-38cadace5bc6f9e62f7d91f14bf1d9fa6da2cd23.zip seabios-hppa-38cadace5bc6f9e62f7d91f14bf1d9fa6da2cd23.tar.gz seabios-hppa-38cadace5bc6f9e62f7d91f14bf1d9fa6da2cd23.tar.bz2 |
Add tools/checksum.py tool.
Diffstat (limited to 'tools/checksum.py')
-rwxr-xr-x | tools/checksum.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/checksum.py b/tools/checksum.py new file mode 100755 index 0000000..8c7665d --- /dev/null +++ b/tools/checksum.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# Script to report the checksum of a file. +# +# Copyright (C) 2009 Kevin O'Connor <kevin@koconnor.net> +# +# This file may be distributed under the terms of the GNU GPLv3 license. + +import sys + +def main(): + data = sys.stdin.read() + ords = map(ord, data) + print "sum=%x\n" % sum(ords) + +if __name__ == '__main__': + main() |