cpt

[ARCHIVED] Carbs Packaging Tools
git clone git://git.ckyln.com/~cem/cpt.git
Log | Files | Refs | README | LICENSE

commit 241943bf73526e0c8461d27605227f2bc663c8c8
parent 8fdce7c6fa245115b7255a635135f211fb8597e3
Author: Cem Keylan <cem@ckyln.com>
Date:   Thu, 14 May 2020 11:25:05 +0300

kiss: split hashcheck command so it is easier to read.

Diffstat:
Mkiss | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/kiss b/kiss @@ -107,8 +107,10 @@ hashcheck() { # it outputs a single space between the hash and the file # whereas sha256sum outputs double spaces. It fallbacks to # openssl, but that is rarely ever needed. - { sha256sum "$1" 2>/dev/null || sha256 -r "$1" 2>/dev/null || - openssl dgst -r -sha256 "$1" || die "No sha256 program could be run." ;} | + { sha256sum "$1" 2>/dev/null || + sha256 -r "$1" 2>/dev/null || + openssl dgst -r -sha256 "$1" || + die "No sha256 program could be run." ;} | while read -r hash _; do printf '%s %s\n' "$hash" "$1"; done }