penguin/utils

my env utils

commit 612ab0a434b801815901f7625d1d626c41d838fb

author斟酌 鵬兄 <tgckpg@gmail.com>
date2023-09-17T14:34:40Z
subjectUpdate s3-arch sum
commit 612ab0a434b801815901f7625d1d626c41d838fb
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2023-09-17T14:34:40Z

    Update s3-arch sum
---
 bash/sources/16_keystore | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/bash/sources/16_keystore b/bash/sources/16_keystore
index b208ec0..60a4dad 100644
--- a/bash/sources/16_keystore
+++ b/bash/sources/16_keystore
@@ -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 {