From f2b994ec71b5dc908374e6c84cf0c390b1445a00 Mon Sep 17 00:00:00 2001 From: jonaro00 <54029719+jonaro00@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:26:45 +0200 Subject: [PATCH] feat(installer): install shuttle binary --- install.ps1 | 1 + install.sh | 26 ++++++++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/install.ps1 b/install.ps1 index c0c0de867..1bc38256a 100644 --- a/install.ps1 +++ b/install.ps1 @@ -72,6 +72,7 @@ Please file an issue if you encounter any problems! New-Item -ItemType Directory -Force "$TempDir\cargo-shuttle" tar.exe -xzf "$TempDir\cargo-shuttle.tar.gz" -C "$TempDir\cargo-shuttle" Move-Item -Force "$TempDir\cargo-shuttle\cargo-shuttle-x86_64-pc-windows-msvc-$LatestRelease\cargo-shuttle.exe" "$CargoHome\bin\cargo-shuttle.exe" + Move-Item -Force "$TempDir\cargo-shuttle\cargo-shuttle-x86_64-pc-windows-msvc-$LatestRelease\shuttle.exe" "$CargoHome\bin\shuttle.exe" Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "$TempDir\cargo-shuttle.tar.gz", "$TempDir\cargo-shuttle" Write-Host "Installed cargo-shuttle, try running ``cargo shuttle --help``" -ForegroundColor Green return diff --git a/install.sh b/install.sh index f6039b95b..65348b3ce 100755 --- a/install.sh +++ b/install.sh @@ -3,12 +3,12 @@ set -euo pipefail cat </dev/null || exit 1 if [[ ":$PATH:" != *":$HOME/.cargo/bin:"* ]]; then echo "Add $HOME/.cargo/bin to PATH to run cargo-shuttle" @@ -151,7 +153,7 @@ _install_with_cargo() { cargo install --locked cargo-shuttle } -_install_unsupported() { +_install_default() { echo "Installing with package manager is not supported" if command -v cargo-binstall &>/dev/null; then @@ -166,7 +168,7 @@ _install_unsupported() { else echo "rustup was found, but cargo wasn't. Something is up with your install" exit 1 - fi + fi fi while true; do @@ -205,7 +207,7 @@ fi case "$OSTYPE" in linux*) _install_linux ;; darwin*) _install_mac ;; -*) _install_unsupported ;; +*) _install_default ;; esac cat <