Skip to content

Commit

Permalink
feat: attempt to install rye with cargo
Browse files Browse the repository at this point in the history
  • Loading branch information
Szymon Szyszkowski committed Aug 13, 2024
1 parent 332e0d5 commit ce4fd37
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ce4fd37

Please sign in to comment.