commit f13fe397b655ecee2a11787c74fc98d85098b68a
| author | 斟酌 鵬兄 <tgckpg@gmail.com> |
| date | 2023-10-07T17:51:13Z |
| subject | Always download when called |
commit f13fe397b655ecee2a11787c74fc98d85098b68a
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date: 2023-10-07T17:51:13Z
Always download when called
---
bash/sources/16_keystore | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/bash/sources/16_keystore b/bash/sources/16_keystore
index 8561ff2..35bca9c 100644
--- a/bash/sources/16_keystore
+++ b/bash/sources/16_keystore
@@ -302,20 +302,17 @@ function kstore-dl-s3au {
_CSUM=$1
_NAME=$2
- which "$_NAME" > /dev/null 2>&1
- if [ $? -ne 0 ]; then
- tmp=$( mktemp )
- __download "$p/$_NAME" > $tmp
- sha256sum $tmp | grep -q "$_CSUM"
- if [ $? -eq 0 ]; then
- _NAME=$( basename "${_NAME//_/-}" .sh )
- mv $tmp "$RBASH_BIN/$_NAME"
- chmod +x "$RBASH_BIN/$_NAME"
- echo "> $RBASH_BIN/$_NAME"
- else
- echo "$_NAME: Signature mismatch"
- return 1
- fi
+ tmp=$( mktemp )
+ __download "$p/$_NAME" > $tmp
+ sha256sum $tmp | grep -q "$_CSUM"
+ if [ $? -eq 0 ]; then
+ _NAME=$( basename "${_NAME//_/-}" .sh )
+ mv $tmp "$RBASH_BIN/$_NAME"
+ chmod +x "$RBASH_BIN/$_NAME"
+ echo "> $RBASH_BIN/$_NAME"
+ else
+ echo "$_NAME: Signature mismatch"
+ return 1
fi
}