diff --git a/install.sh b/install.sh index 6de0ea8..3a2ecf1 100755 --- a/install.sh +++ b/install.sh @@ -73,7 +73,7 @@ main() { log_info "Detected OS: $OS" log_info "Detected architecture: $ARCH" - # Determine file extension and archive name + # Determine file extension if [ "$OS" = "windows" ]; then EXT="zip" BINARY_NAME="git-mirror.exe" @@ -94,6 +94,9 @@ main() { log_info "Latest version: $VERSION" + # Construct archive name after VERSION is known + ARCHIVE_NAME="${BINARY_NAME%.*}-${OS}-${ARCH}-${VERSION}.${EXT}" + # Download URL DOWNLOAD_URL="https://github.com/${REPO}/releases/download/${VERSION}/${ARCHIVE_NAME}" CHECKSUM_URL="${DOWNLOAD_URL}.sha256"