[Ubuntu] Set user-related environmental variables and PATH via post deployment script (#3030)

* Move home directory vars to post-deploy scripts

* Remove "export" word

* Move home directory vars to post-deploy scripts

* Remove "export" word

* add variables via post-deployment file

* remove quotes around PATH

* remove quotes

* Replace $HOME in /etc/environment in post-deployment script

* rename variable

* get rid of extra variable
This commit is contained in:
Mikhail Timofeev
2021-03-26 18:33:51 +03:00
committed by GitHub
parent a769b06872
commit dd506183e2
6 changed files with 11 additions and 10 deletions

View File

@@ -8,7 +8,7 @@ export NVM_DIR="/etc/skel/.nvm"
mkdir $NVM_DIR
VERSION=$(curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r '.tag_name')
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION/install.sh | bash
echo 'export NVM_DIR=$HOME/.nvm' | tee -a /etc/skel/.bash_profile
echo 'NVM_DIR=$HOME/.nvm' | tee -a /etc/environment
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' | tee -a /etc/skel/.bash_profile
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"