Skip to content

Commit

Permalink
script: optimize print
Browse files Browse the repository at this point in the history
  • Loading branch information
chaunsin committed Nov 24, 2024
1 parent 144c3b3 commit 800e50e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions script/qinglong/qinglong_ncmctl_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,10 @@ is_installed() {
# 下载和解压程序
download_and_extract() {
echo "Downloading the latest version..."

# 根据架构动态拼接下载 URL
#DOWNLOAD_URL="https://github.com/$REPO/releases/download/$LATEST_VERSION/${BINARY_NAME}-${OS}-${ARCH}.tar.gz"
DOWNLOAD_URL="https://gitee.com/$REPO/releases/download/$LATEST_VERSION/${BINARY_NAME}-${OS}-${ARCH}.tar.gz"
echo "Download URL: $DOWNLOAD_URL"

mkdir -p "$TEMP_DIR"
curl -L "$DOWNLOAD_URL" -o "$TEMP_DIR/$BINARY_NAME.tar.gz" || { echo "Download failed. Exiting."; exit 1; }
Expand All @@ -118,8 +118,8 @@ install_binary() {
exit 1;
fi
echo "Installing $BINARY_NAME..."
sudo mv "$TEMP_DIR/$BINARY_NAME" "$BINARY_PATH" || { echo "Installation failed. Exiting."; exit 1; }
sudo chmod +x "$BINARY_PATH"
mv "$TEMP_DIR/output/$BINARY_NAME" "$BINARY_PATH" || { echo "Installation failed. Exiting."; exit 1; }
chmod +x "$BINARY_PATH"
echo "$BINARY_NAME installed successfully at $BINARY_PATH (version: $LATEST_VERSION)."
}

Expand Down

0 comments on commit 800e50e

Please sign in to comment.