Compare commits

...

3 Commits

2 changed files with 7 additions and 11 deletions

View File

@ -29,22 +29,18 @@ if [ "${HOME_USER-}" ]; then
sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc
# Copy environment variables from vscode user to HOME_USER # Copy environment variables from vscode user to HOME_USER
# env | grep -v 'HOME_USER' | while read -r line; do env | grep -v 'HOME_USER' | while read -r line; do
# sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc" sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc"
# done done
# Copy the PATH variable from vscode user to HOME_USER # Copy the HOME variable from vscode user to HOME_USER
#PATH_LINE=$(grep "^PATH=" /home/vscode/.bashrc) sudo su - ${HOME_USER} -c "echo 'export HOME=\"/home/\${HOME_USER}\"' >> ~/.bashrc"
#sudo su - ${HOME_USER} -c "echo '${PATH_LINE}' >> ~/.bashrc"
# Copy the .bashrc file from vscode user to HOME_USER # Copy the .bashrc file from vscode user to HOME_USER
sudo su - ${HOME_USER} -c "cat /home/vscode/.bashrc >> ~/.bashrc" sudo su - ${HOME_USER} -c "cat /home/vscode/.bashrc >> ~/.bashrc"
# Changing the property of the directory /home/${HOME_USER}
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/
# Changing the HOME_USER in the .bashrc file # Changing the HOME_USER in the .bashrc file
sudo su - ${HOME_USER} -c 'sed -i "s|/home/vscode|/home/${HOME_USER}|g" ~/.bashrc' sudo su - ${HOME_USER} -c 'sudo sed -i "s|/home/vscode|/home/${HOME_USER}|g" ~/.bashrc'
# Switch to the user specified by $HOME_USER and start an interactive shell session. # Switch to the user specified by $HOME_USER and start an interactive shell session.
sudo su -l ${HOME_USER} sudo su -l ${HOME_USER}

View File

@ -1 +1 @@
2.0.37 2.0.40