mrrl

Minimal Reliable Reproducible Linux
git clone https://ccx.te2000.cz/git/mrrl
Log | Files | Refs | Submodules | README

commit 768b584650bb7387759d41077a93f2ac27f59e4b
parent 12a62e01a97f2569c46f74976f6e22cc32f7d9ae
Author: Jan Pobříslo <ccx@te2000.cz>
Date:   Wed,  7 Jun 2023 14:13:02 +0200

Minimal directory tree manifest generator.

Diffstat:
Acommand/pthbs-digest-files | 7+++++++
Acommand/pthbs-digest-tree | 5+++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/command/pthbs-digest-files b/command/pthbs-digest-files @@ -0,0 +1,7 @@ +#!/bin/sh +for fname in "$@"; do + busybox stat -c "# %F %a %u:%g %sB %N" "$fname" || exit $? + if test -f "$fname"; then + sha256sum "$fname" || exit $? + fi +done diff --git a/command/pthbs-digest-tree b/command/pthbs-digest-tree @@ -0,0 +1,5 @@ +#!/bin/sh +if test -n "$1"; then + cd "$1" || exit $? +fi +busybox find -print0 | busybox sort -z | busybox xargs -0 pthbs-digest-files