@@ -302,6 +302,10 @@ case "${OS}-${ARCH}" in
302302 mingw* -amd64|msys* -amd64|cygwin* -amd64) TARGET=" windows-amd64" ; EXT=" zip" ;;
303303 * ) : ;;
304304esac
305+ INSTALL_BASENAME=" cass"
306+ if [ " $TARGET " = " windows-amd64" ]; then
307+ INSTALL_BASENAME=" cass.exe"
308+ fi
305309
306310# Prefer prebuilt artifact when we know the target or the caller supplied a direct URL.
307311TAR=" "
@@ -371,13 +375,19 @@ if [ "$FROM_SOURCE" -eq 1 ]; then
371375 ensure_rust
372376 git clone --depth 1 --branch " $VERSION " " https://github.com/${OWNER} /${REPO} .git" " $TMP /src"
373377 (cd " $TMP /src" && cargo build --release)
374- BIN=" $TMP /src/target/release/cass"
378+ BIN=" $TMP /src/target/release/$INSTALL_BASENAME "
379+ if [ ! -x " $BIN " ]; then
380+ BIN=" $TMP /src/target/release/cass"
381+ fi
382+ if [ ! -x " $BIN " ]; then
383+ BIN=" $TMP /src/target/release/cass.exe"
384+ fi
375385 [ -x " $BIN " ] || { err " Build failed" ; exit 1; }
376- install -m 0755 " $BIN " " $DEST "
377- ok " Installed to $DEST /cass (source build)"
386+ install -m 0755 " $BIN " " $DEST / $INSTALL_BASENAME "
387+ ok " Installed to $DEST /$INSTALL_BASENAME (source build)"
378388 maybe_add_path
379- if [ " $VERIFY " -eq 1 ]; then " $DEST /cass " --version || true ; ok " Self-test complete" ; fi
380- if [ " $QUICKSTART " -eq 1 ]; then info " Running index --full (quickstart)" ; " $DEST /cass " index --full || warn " index --full failed" ; fi
389+ if [ " $VERIFY " -eq 1 ]; then " $DEST /$INSTALL_BASENAME " --version || true ; ok " Self-test complete" ; fi
390+ if [ " $QUICKSTART " -eq 1 ]; then info " Running index --full (quickstart)" ; " $DEST /$INSTALL_BASENAME " index --full || warn " index --full failed" ; fi
381391 ok " Done. Run: cass"
382392 exit 0
383393fi
@@ -454,18 +464,18 @@ if [ ! -x "$BIN" ]; then
454464fi
455465
456466[ -x " $BIN " ] || { err " Binary not found in tar" ; exit 1; }
457- install -m 0755 " $BIN " " $DEST /cass "
458- ok " Installed to $DEST /cass "
467+ install -m 0755 " $BIN " " $DEST /$INSTALL_BASENAME "
468+ ok " Installed to $DEST /$INSTALL_BASENAME "
459469maybe_add_path
460470
461471if [ " $VERIFY " -eq 1 ]; then
462- " $DEST /cass " --version || true
472+ " $DEST /$INSTALL_BASENAME " --version || true
463473 ok " Self-test complete"
464474fi
465475
466476if [ " $QUICKSTART " -eq 1 ]; then
467477 info " Running index --full (quickstart)"
468- " $DEST /cass " index --full || warn " index --full failed"
478+ " $DEST /$INSTALL_BASENAME " index --full || warn " index --full failed"
469479fi
470480
471481ok " Done. Run: cass"
0 commit comments