From c59ec779def243f810a3b881627d6032327508a1 Mon Sep 17 00:00:00 2001 From: siujamo Date: Fri, 21 Aug 2026 10:23:48 +0800 Subject: [PATCH] feat(scripts): enhance tosutil installer with env var guidance and doc link - Download and verify tosutil binary via SHA256 checksum - Install to /usr/local/bin with root:root 755 permissions - Add post-installation instructions utilising environment variables - Include reference link to official Volcengine documentation --- Linux/install-tosutil.sh | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Linux/install-tosutil.sh b/Linux/install-tosutil.sh index f1ae55d..146a455 100644 --- a/Linux/install-tosutil.sh +++ b/Linux/install-tosutil.sh @@ -33,11 +33,9 @@ run_cmd wget -q --show-progress -O tosutil.sha256sum "$SHA_URL" # Verify SHA256 echo -e "\n[2/5] Verifying SHA256 checksum..." -# Check format: ensure the checksum file points to the local filename if grep -q "tosutil" tosutil.sha256sum; then run_cmd sha256sum -c tosutil.sha256sum else - # Fallback if sha256sum contains only the hash string EXPECTED_HASH=$(awk '{print $1}' tosutil.sha256sum) echo ">> Running: echo \"$EXPECTED_HASH tosutil\" | sha256sum -c -" echo "$EXPECTED_HASH tosutil" | sha256sum -c - @@ -54,6 +52,13 @@ run_cmd $SUDO chmod 755 "$TARGET_PATH" # Completion check echo -e "\n[5/5] Checking installation..." -run_cmd tosutil version || run_cmd tosutil --version || true +run_cmd tosutil version || true -echo -e "\nāœ… tosutil installed successfully to ${TARGET_PATH}." \ No newline at end of file +echo -e "\n========================================================" +echo -e "āœ… tosutil installed successfully to ${TARGET_PATH}." +echo -e "========================================================" +echo -e "\nNext Steps:" +echo -e "1. Initialise and configure your credentials:" +echo -e ' tosutil config -i "${TOS_ACCESS_KEY}" -k "${TOS_SECRET_KEY}" -e "${TOS_ENDPOINT}" -re "${TOS_REGION}"' +echo -e "\n2. For more detailed documentation, visit:" +echo -e " https://docs.volcengine.com/docs/6349/148775?lang=zh\n" \ No newline at end of file