Skip to content

Commit ddbd06e

Browse files
committed
fix: install.sh latest URL format (/releases/latest/download/ not /releases/download/latest/)
1 parent 18ebca5 commit ddbd06e

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

scripts/install.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,13 @@ fi
190190

191191
TAG="${VERSION:-latest}"
192192
ASSET="memoria-${TARGET}.tar.gz"
193-
URL="https://github.com/${REPO}/releases/download/${TAG}/${ASSET}"
193+
if [ "$TAG" = "latest" ]; then
194+
URL="https://github.com/${REPO}/releases/latest/download/${ASSET}"
195+
SUM_URL="https://github.com/${REPO}/releases/latest/download/SHA256SUMS.txt"
196+
else
197+
URL="https://github.com/${REPO}/releases/download/${TAG}/${ASSET}"
198+
SUM_URL="https://github.com/${REPO}/releases/download/${TAG}/SHA256SUMS.txt"
199+
fi
194200

195201
if [ "$DRY_RUN" = true ]; then
196202
echo "URL: $URL"
@@ -248,7 +254,6 @@ curl -fL# -o "$TMP/$ASSET" "$URL" || {
248254

249255
# ── Verify checksum ─────────────────────────────────────────────────
250256

251-
SUM_URL="https://github.com/${REPO}/releases/download/${TAG}/SHA256SUMS.txt"
252257
if curl -sSLf -o "$TMP/SHA256SUMS.txt" "$SUM_URL" 2>/dev/null; then
253258
if (cd "$TMP" && grep -F "$ASSET" SHA256SUMS.txt | (sha256sum -c 2>/dev/null || shasum -a 256 -c 2>/dev/null)); then
254259
ok "Checksum verified"

0 commit comments

Comments
 (0)