Compare commits

..

7 Commits
3.0.1 ... 3.0.8

2 changed files with 25 additions and 6 deletions

View File

@ -9,8 +9,10 @@ if ! grep -q "HOME_USER=" /etc/environment; then
sudo bash -c "echo HOME_USER=$HOME_USER >> /etc/environment"
fi
if [[ -n $VSCODE_TUNNEL_NAME ]] && ! grep -q "VSCODE_TUNNEL_NAME=" /etc/environment; then
sudo bash -c "echo VSCODE_TUNNEL_NAME=$VSCODE_TUNNEL_NAME >> /etc/environment"
if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then
if ! grep -q "VSCODE_TUNNEL_NAME=" /etc/environment; then
sudo bash -c "echo VSCODE_TUNNEL_NAME=$VSCODE_TUNNEL_NAME >> /etc/environment"
fi
fi
# List all environment variables
@ -38,6 +40,14 @@ if ! id -u $HOME_USER > /dev/null 2>&1; then
sudo adduser --disabled-password --gecos "" ${HOME_USER}
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
# Check if the .bashrc file exists, if not, create it
if [ ! -f /home/${HOME_USER}/.bashrc ]; then
sudo touch /home/${HOME_USER}/.bashrc
fi
# Change the ownership of the .bashrc file
sudo chown ${HOME_USER} /home/${HOME_USER}/.bashrc
# List all environment variables
sudo env |
@ -52,6 +62,15 @@ if ! id -u $HOME_USER > /dev/null 2>&1; then
do
echo "export $line" | sudo tee -a /home/${HOME_USER}/.bashrc
done
# Creating .vscode folder if it doesn't exist
if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
sudo mkdir -p /home/${HOME_USER}/.vscode
fi
# Changing the property of the directory /home/${HOME_USER}/.vscode
sudo chown -R ${HOME_USER}: /home/${HOME_USER}/.vscode
fi
# Then execute entrypoint.sh
@ -108,8 +127,8 @@ else
echo "File extensions.json not found"
fi
if [[ -z "${VSCODE_TUNNEL_NAME}" ]]; then
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms"
else
if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}"
else
sudo su - ${HOME_USER} -c "code tunnel --accept-server-license-terms"
fi

View File

@ -1 +1 @@
3.0.1
3.0.8