Commit 4e7d8b8b authored by Moul's avatar Moul

[build] Do not install rustup whether Rust is already installed

by the distribution package manager

Use 'command -v' to know if an executable is present in the PATH
There is an error with 'rustup' not found, but that's fine
parent a9b099f7
#!/bin/sh
if [ -z "${DUNITER_FAST_BUILD}" ]; then
if [ -e "${HOME}/.cargo/bin/rustup" ]; then
if [ "$(command -v rustup)" ]; then
rustup update stable
else
elif [ ! "$(command -v cargo)" ]; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment