Migrate /etc/environment modifications to helpers (#660)

* migrate rust

* Migrate PHP composer

* Migrate dotnet core sdk

* rename `var_*` to `variable_*`

* rename *etcEnvironmentVar functions to *etcEnvironmentVariable

* add AppendEtcEnvironmentVariable  and PrependEtcEnvironmentVariable

* rename addEtcEnvironmentPathElement to prependEtcEnvironmentPath

* Remove updatepath.sh

Co-authored-by: Sergey Dolin <v-sedoli@micorosoft.com>
This commit is contained in:
Sergey Dolin
2020-04-14 13:23:44 +05:00
committed by GitHub
parent 44e904205f
commit bb9538cc9b
9 changed files with 55 additions and 36 deletions

View File

@@ -5,10 +5,9 @@
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/document.sh
set -e
export RUSTUP_HOME=/usr/share/rust/.rustup
export CARGO_HOME=/usr/share/rust/.cargo
@@ -33,6 +32,9 @@ for cmd in rustup rustc rustdoc cargo rustfmt cargo-clippy bindgen cbindgen; do
fi
done
# Update /etc/environemnt
prependEtcEnvironmentPath "${CARGO_HOME}/bin"
# Rust Symlinks are added to a default profile /etc/skel
pushd /etc/skel
ln -sf $RUSTUP_HOME .rustup