From b740d2bfff7994ef6f2de44fc913db2dde6b514b Mon Sep 17 00:00:00 2001 From: brent s Date: Tue, 19 Jan 2021 01:12:07 -0500 Subject: [PATCH] adding some changes --- sys/BootSync/bootsync.hook | 13 +++++++++++++ sys/find_dupes.py | 16 ++++++++++++++++ 2 files changed, 29 insertions(+) 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 = {}