Skip to content

Commit

Permalink
tools: format utils.sh with two space indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
fasenderos committed May 24, 2023
1 parent 46a7a74 commit ea37d4c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions tools/dep_updaters/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@
# $3 (optional) is the deposited sha256 cheksum. When provided, it is checked
# against the checksum generated from the archive
log_and_verify_sha256sum() {
package_name="$1"
archive="$2"
checksum="$3"
bsd_formatted_checksum=$(sha256sum --tag "$archive")
if [ -z "$3" ]; then
echo "$bsd_formatted_checksum"
package_name="$1"
archive="$2"
checksum="$3"
bsd_formatted_checksum=$(sha256sum --tag "$archive")
if [ -z "$3" ]; then
echo "$bsd_formatted_checksum"
else
archive_checksum=$(sha256sum "$archive")
if [ "$checksum" = "$archive_checksum" ]; then
echo "Valid $package_name checksum"
echo "$bsd_formatted_checksum"
else
archive_checksum=$(sha256sum "$archive")
if [ "$checksum" = "$archive_checksum" ]; then
echo "Valid $package_name checksum"
echo "$bsd_formatted_checksum"
else
echo "ERROR - Invalid $package_name checksum:"
echo "deposited: $checksum"
echo "generated: $archive_checksum"
exit 1
fi
echo "ERROR - Invalid $package_name checksum:"
echo "deposited: $checksum"
echo "generated: $archive_checksum"
exit 1
fi
fi
}

0 comments on commit ea37d4c

Please sign in to comment.