Insert newlines to make the output more readable.

This commit is contained in:
Cyril Brulebois 2024-07-23 13:48:23 +02:00
parent effce13fdd
commit 9846b9ee03

View File

@ -30,21 +30,21 @@ xz_compress() {
# compressed images (as opposed to checksums for the uncompressed images). To # compressed images (as opposed to checksums for the uncompressed images). To
# make sure everything is consistent, compare checksum of the original file # make sure everything is consistent, compare checksum of the original file
# vs. checksum of a decompressed compressed image: # vs. checksum of a decompressed compressed image:
printf 'Computing checksum for %s...' "$FILE" echo "Computing checksum for $FILE..."
SUM1=$(sha256sum "$FILE" | awk '{print $1}') SUM1=$(sha256sum "$FILE" | awk '{print $1}')
echo " $SUM1" echo " $SUM1"
if which pixz >/dev/null 2>&1; then if which pixz >/dev/null 2>&1; then
printf 'Compressing %s with pixz...' "$FILE" echo "Compressing $FILE with pixz..."
pixz "$FILE" pixz "$FILE"
echo ' done' echo ' done'
else else
printf 'Compressing %s with xz...' "$FILE" echo "Compressing $FILE with xz..."
xz "$FILE" xz "$FILE"
echo ' done' echo ' done'
fi fi
printf 'Computing checksum for %s after decompression...' "$FILE" echo "Computing checksum for $FILE after decompression..."
SUM2=$(xz -c -d "$FILE.xz" | sha256sum | awk '{print $1}') SUM2=$(xz -c -d "$FILE.xz" | sha256sum | awk '{print $1}')
if [ "$SUM1" = "$SUM2" ]; then if [ "$SUM1" = "$SUM2" ]; then
echo " $SUM2 (match)" echo " $SUM2 (match)"