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,6 +5,7 @@
################################################################################
# Source the helpers for use with the script
source $HELPER_SCRIPTS/etc-environment.sh
source $HELPER_SCRIPTS/document.sh
LSB_RELEASE=$(lsb_release -rs)
@@ -276,6 +277,9 @@ php composer-setup.php
sudo mv composer.phar /usr/bin/composer
php -r "unlink('composer-setup.php');"
# Update /etc/environment
prependEtcEnvironmentPath /home/runner/.config/composer/vendor/bin
# Add composer bin folder to path
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> /etc/skel/.bashrc
@@ -293,6 +297,7 @@ for cmd in php php5.6 php7.0 php7.1 php7.2 php7.3 php7.4 composer phpunit; do
fi
done
# Document what was added to the image
echo "Lastly, documenting what we added to the metadata file"
DocumentInstalledItem "PHP 5.6 ($(php5.6 --version | head -n 1))"