diff --git a/sys/BootSync/bootsync.hook b/sys/BootSync/bootsync.hook index 36ff48b..54ab194 100644 --- a/sys/BootSync/bootsync.hook +++ b/sys/BootSync/bootsync.hook @@ -8,7 +8,20 @@ Operation = Upgrade Operation = Remove Type = File Target = boot/* +Target = usr/lib/modules/*/vmlinuz +Target = usr/lib/initcpio/* + +[Trigger] +Operation = Install +Operation = Upgrade +Operation = Remove +Type = Package +Target = linux +Target = mkinitcpio [Action] When = PostTransaction Exec = /usr/local/bin/bootsync +Depends = python-magic +Depends = python-psutil +Depends = python-lxml diff --git a/sys/find_dupes.py b/sys/find_dupes.py index e69de29..e50ca05 100644 --- a/sys/find_dupes.py +++ b/sys/find_dupes.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 + +import argparse +import hashlib +import os + + +_supported_hashes = hashlib.algorithms_available + + +class Hasher(object): + def __init__(self, hashalgo = None): + if hashalgo not in _supported_hashes: + raise ValueError('hashalgo not in supported hash algorithm types') + self.hash = hashlib.new(hashalgo) + self.hashes = {}