Skip to content

Commit

Permalink
Update shell script for downloading Rust to prevent resetting existin…
Browse files Browse the repository at this point in the history
…g Rust environment on installed machines.
  • Loading branch information
eliezhao committed Mar 29, 2024
1 parent 7d8b66b commit c78e3af
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions build_ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,18 @@ sudo apt-get install -y \
ufw


# Install Rust
# Check if Rust is installed, if not, install Rust.

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
if command -v rustc &> /dev/null
then
echo "Rust is already installed. Skipping installation."
else
# Install Rust
echo "Rust is not installed. Installing now..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME"/.cargo/env
echo "Rust installation complete."
fi

# Install snarkOS
# cargo clean
Expand Down

0 comments on commit c78e3af

Please sign in to comment.