Compare commits

..

12 Commits

2 changed files with 15 additions and 10 deletions

View File

@ -33,20 +33,25 @@ if [ "${HOME_USER-}" ]; then
sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc" sudo su - ${HOME_USER} -c "echo 'export $line' >> ~/.bashrc"
done done
# Get the PATH of vscode user # Copy the .bashrc file from vscode user to HOME_USER
VSCODE_PATH=$(sudo -u vscode -i echo $PATH) sudo su - ${HOME_USER} -c "cat /home/vscode/.bashrc >> ~/.bashrc"
# Add the PATH to the .bashrc of HOME_USER # Creating .vscode folder if it doesn't exist
sudo su - ${HOME_USER} -c "echo 'export PATH=$VSCODE_PATH' >> ~/.bashrc" if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
sudo mkdir -p /home/${HOME_USER}/.vscode
# Changing the property of the directory /home/${HOME_USER} fi
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/
# Changing the property of the directory /home/${HOME_USER}/.vscode
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode
# 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 -u $HOME_USER -i sudo su -l ${HOME_USER}
# Delete the vscode user
sudo userdel vscode
fi fi
fi fi

View File

@ -1 +1 @@
2.0.36 2.0.48