Insert newlines to make the output more readable.
This commit is contained in:
parent
effce13fdd
commit
9846b9ee03
18
build-images
18
build-images
@ -30,26 +30,26 @@ 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)"
|
||||||
else
|
else
|
||||||
echo " $SUM2 (NO MATCH), exiting!"
|
echo " $SUM2 (NO MATCH), exiting!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user