[game-data-packager] 01/12: add 'cksums: |' to make template
Simon McVittie
smcv at debian.org
Sat Jan 24 17:56:16 UTC 2015
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to branch master
in repository game-data-packager.
commit 9f0d093aa5408472cfb8a0b3f31e79b22d816582
Author: Alexandre Detiste <alexandre.detiste at gmail.com>
Date: Sat Jan 24 09:06:11 2015 +0100
add 'cksums: |' to make template
---
game_data_packager/make_template.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/game_data_packager/make_template.py b/game_data_packager/make_template.py
index f7de26e..d5b7dda 100644
--- a/game_data_packager/make_template.py
+++ b/game_data_packager/make_template.py
@@ -35,7 +35,7 @@ def do_one_dir(destdir):
package = data.setdefault('packages', {}).setdefault('FIXME', {})
package['install'] = []
package['install_to'] = destdir
- sums = dict(sha1={}, md5={}, sha256={})
+ sums = dict(sha1={}, md5={}, sha256={}, ck={})
for dirpath, dirnames, filenames in os.walk(destdir):
for fn in filenames:
@@ -53,6 +53,7 @@ def do_one_dir(destdir):
data['files'][name] = dict(size=os.path.getsize(path))
hf = HashedFile.from_file(name, open(path, 'rb'))
+ sums['ck'][name] = os.path.getsize(path)
sums['md5'][name] = hf.md5
sums['sha1'][name] = hf.sha1
sums['sha256'][name] = hf.sha256
@@ -66,7 +67,10 @@ def do_one_dir(destdir):
for alg, files in sorted(sums.items()):
print('%ssums: |' % alg)
for filename, sum_ in sorted(files.items()):
- print(' %s %s' % (sum_, filename))
+ if alg == 'ck':
+ print(' _ %-9s %s' % (sum_, filename))
+ else:
+ print(' %s %s' % (sum_, filename))
print('...')
print('')
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/game-data-packager.git
More information about the Pkg-games-commits
mailing list