mirror of
https://github.com/minio/minio.git
synced 2024-12-27 07:35:55 -05:00
32 lines
582 B
Bash
Executable File
32 lines
582 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
|
|
set -e
|
|
|
|
if [ ! -x "/opt/bin/minio" ]; then
|
|
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
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
main() {
|
|
verify_sha256sum
|
|
|
|
verify_signature
|
|
}
|
|
|
|
main "$@"
|