mirror of
https://gitlab.com/veilid/veilid.git
synced 2025-04-19 15:25:54 -04:00
add idempotent rust install check for safe installation in container
This commit is contained in:
parent
e055688dac
commit
dceddd16f8
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
#set -eo pipefail
|
||||
set -ex
|
||||
|
||||
if [ $(id -u) -eq 0 ]; then
|
||||
echo "Don't run this as root"
|
||||
@ -27,9 +28,14 @@ elif [ ! -z "$(command -v dnf)" ]; then
|
||||
sudo dnf groupinstall -y 'Development Tools'
|
||||
fi
|
||||
|
||||
# Install Rust
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -c clippy --profile default
|
||||
source "$HOME/.cargo/env"
|
||||
# Install Rust if not already installed
|
||||
if ! command -v rustc >/dev/null 2>&1; then
|
||||
echo "Installing Rust..."
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -c clippy --profile default
|
||||
source "$HOME/.cargo/env"
|
||||
else
|
||||
echo "Rust is already installed"
|
||||
fi
|
||||
|
||||
#ask if they want to install optional android sdk (and install if yes)
|
||||
while true; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user