diff options
author | merakor <cem@ckyln.com> | 2020-05-14 08:25:05 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-05-14 08:25:05 +0000 |
commit | e173ffb8c3b5398612dd1bbecfae1842e3b85b96 (patch) | |
tree | 67fbabb03c621ebe6ccf1a9d08a826461f4c8222 | |
parent | 82c16e56796ffe3f8162b85af6e7f2e1306afb20 (diff) | |
download | cpt-e173ffb8c3b5398612dd1bbecfae1842e3b85b96.tar.gz |
kiss: split hashcheck command so it is easier to read.
FossilOrigin-Name: c031a270e6f18cac2c3fc1a0fb750dffb621c75db8b4668d90d3597ad7a780e1
-rwxr-xr-x | kiss | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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 } |