[Ubuntu] get rid of post-gen rust script (#4575)

This commit is contained in:
Mikhail Koliada
2021-11-26 12:39:13 +03:00
committed by GitHub
parent 8922c7b5bf
commit af645a7b5e
4 changed files with 15 additions and 30 deletions

View File

@@ -7,8 +7,8 @@
# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
export RUSTUP_HOME=/usr/share/rust/.rustup
export CARGO_HOME=/usr/share/rust/.cargo
export RUSTUP_HOME=/etc/skel/.rustup
export CARGO_HOME=/etc/skel/.cargo
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain=stable --profile=minimal
@@ -19,19 +19,10 @@ source $CARGO_HOME/env
rustup component add rustfmt clippy
cargo install --locked bindgen cbindgen cargo-audit cargo-outdated
# Permissions
chmod -R 777 $(dirname $RUSTUP_HOME)
# Cleanup Cargo cache
rm -rf ${CARGO_HOME}/registry/*
# Update /etc/environemnt
prependEtcEnvironmentPath "${CARGO_HOME}/bin"
prependEtcEnvironmentPath '$HOME/.cargo/bin'
# Rust Symlinks are added to a default profile /etc/skel
pushd /etc/skel
ln -sf $RUSTUP_HOME .rustup
ln -sf $CARGO_HOME .cargo
popd
invoke_tests "Tools" "Rust"
invoke_tests "Tools" "Rust"