diff --git a/dependencies.sh b/dependencies.sh index eee60d4e..54904eeb 100755 --- a/dependencies.sh +++ b/dependencies.sh @@ -11,15 +11,6 @@ while getopts "yd" opt; do esac done -echo "Install Rust Cargo compiler" -if [ $(command -v cargo &>/dev/null; echo $?) -eq 0 ]; then - echo "Cargo is installed" -else - curl https://sh.rustup.rs -sSf | sh -s -- ${YES} -fi - -. "$HOME/.cargo/env" - echo "Capabilities & PAM packages installation" if [ ! `id -u` -eq 0 ]; then @@ -59,6 +50,15 @@ else exit 2 fi +echo "Install Rust Cargo compiler" +if [ $(command -v cargo &>/dev/null; echo $?) -eq 0 ]; then + echo "Cargo is installed" +else + curl https://sh.rustup.rs -sSf | sh -s -- ${YES} +fi + +. "$HOME/.cargo/env" + # ask for user to install bpf-linker if [ "${YES}" == "-y" ]; then echo "cargo install bpf-linker into /usr/local/bin"