From 305a731772dd7de094ac9b453a45b24946a9a528 Mon Sep 17 00:00:00 2001 From: Andrew Clemons Date: Tue, 8 Feb 2022 22:05:08 +1300 Subject: [PATCH] development/racer: Check for rust version with rustup. Signed-off-by: Andrew Clemons Signed-off-by: Willy Sudiarto Raharjo --- development/racer/racer.SlackBuild | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/development/racer/racer.SlackBuild b/development/racer/racer.SlackBuild index 66ec6f56d6..3efa0fdb48 100644 --- a/development/racer/racer.SlackBuild +++ b/development/racer/racer.SlackBuild @@ -146,10 +146,16 @@ find -L . \ ln -s /usr/bin/rustup rustc ) +RUST_NIGHTLY=${RUST_NIGHTLY:-nightly-2022-01-14} + +if ! rustup toolchain list | grep "$RUST_NIGHTLY" > /dev/null 2>&1 ; then + rustup toolchain install --component rustc-dev --profile default "$RUST_NIGHTLY" +fi + PATH="$(pwd)/rustup-bin:$PATH" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ -rustup run nightly-2022-01-14 cargo build --release $CARGOTARGET +rustup run "$RUST_NIGHTLY" cargo build --release $CARGOTARGET mkdir -p $PKG/usr/bin/