cleanup scripts and apply shfmt (#17284)

This commit is contained in:
Harshavardhana
2023-05-25 22:07:25 -07:00
committed by GitHub
parent 615169c4ec
commit 4a425cbac1
28 changed files with 1456 additions and 1465 deletions
+12 -12
View File
@@ -4,28 +4,28 @@
set -e
if [ ! -x "/opt/bin/minio" ]; then
echo "minio executable binary not found refusing to proceed"
exit 1
echo "minio executable binary not found refusing to proceed"
exit 1
fi
verify_sha256sum() {
echo "verifying binary checksum"
echo "$(awk '{print $1}' /opt/bin/minio.sha256sum) /opt/bin/minio" | sha256sum -c
echo "verifying binary checksum"
echo "$(awk '{print $1}' /opt/bin/minio.sha256sum) /opt/bin/minio" | sha256sum -c
}
verify_signature() {
if [ "${TARGETARCH}" = "arm" ]; then
echo "ignoring verification of binary signature"
return
fi
echo "verifying binary signature"
minisign -VQm /opt/bin/minio -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
if [ "${TARGETARCH}" = "arm" ]; then
echo "ignoring verification of binary signature"
return
fi
echo "verifying binary signature"
minisign -VQm /opt/bin/minio -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
}
main() {
verify_sha256sum
verify_sha256sum
verify_signature
verify_signature
}
main "$@"