Skip to content
Snippets Groups Projects
Commit 4e7d8b8b authored by Moul's avatar Moul
Browse files

[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
No related branches found
No related tags found
1 merge request!1320Improve build script
#!/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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment