Update s3-arch sum

This commit is contained in:
斟酌 鵬兄 2023-09-17 23:34:40 +09:00
parent a9a13d6b39
commit 612ab0a434

View File

@ -290,25 +290,30 @@ function kstore-del {
}
function kstore-dl-s3au {
local p tmp
local p tmp _NAME
p="https://git.k8s.astropenguin.net/penguin/s3-arch-utils/raw/branch/master"
_NAME=$1
which "$1" 2>&1 > /dev/null
which "$_NAME" 2>&1 > /dev/null
if [ $? -ne 0 ]; then
tmp=$( mktemp )
__download "$p/$1" > $tmp
__download "$p/$_NAME" > $tmp
sha256sum $tmp | grep -q "$2"
if [ $? -eq 0 ]; then
mv $tmp "$RBASH_BIN/$1"
chmod +x "$RBASH_BIN/$1"
mv $tmp "$RBASH_BIN/$_NAME"
chmod +x "$RBASH_BIN/$_NAME"
echo "> $RBASH_BIN/$_NAME"
else
echo "$_NAME: Signature mismatch"
return 1
fi
fi
}
function kstore-sync {
kstore-dl-s3au "arch_download_aws4.sh" "f1c2e9c9de380d8e590f46a0cc0c320c711dcff3d7d34a1a86927e61030ae5b8" || return 1
kstore-dl-s3au "arch_upload_aws4.sh" "ca2229a5a7c98e8f5e692129a50b12457f8acbcb366a987cf3d8101cc4b38667" || return 1
kstore-dl-s3au "arch_download_aws4.sh" "c885a6844d2ae50d279517a5b7ab832040c641e27b2966542cbacbf97bb6bef4" || return 1
kstore-dl-s3au "arch_upload_aws4.sh" "b97c537c05d090b325510fab6022d945ba27a2aa821654a1fc6c6c6175691158" || return 1
}
function kstore-search {