From ce4fd37ed2483c353bc552e6d9e91b5f9883dc52 Mon Sep 17 00:00:00 2001 From: Szymon Szyszkowski Date: Tue, 13 Aug 2024 10:29:07 +0100 Subject: [PATCH] feat: attempt to install rye with cargo --- setup.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 8c7883e..9460f0f 100755 --- a/setup.sh +++ b/setup.sh @@ -7,12 +7,21 @@ export SHELL_RC=$(echo "$HOME/.${SHELL##*/}rc") +if ! command -v cargo &>/dev/null; then + echo "Cargo is not installed. Installing..." + curl https://sh.rustup.rs -sSf | sh + echo "Updating $SHELL_RC" + echo "source $HOME/.cargo/bin" >>$SHELL_RC +else + echo "Cargo is installed." +fi +source $SHELL_RC + if ! command -v rye &>/dev/null; then echo "Rye is not installed. Installing..." - curl -sSf https://rye.astral.sh/get | bash + cargo install --git https://github.com/astral-sh/rye --tag 0.38.0 rye echo "Updating $SHELL_RC" echo "source $HOME/.rye/env" >>$SHELL_RC - echo "source $HOME/.cargo/bin" >>$SHELL_RC else echo "Rye is already installed." fi