mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-01-09 05:06:46 -06:00
Update environment variable handling and version number to 3.0.23
This commit is contained in:
parent
b0b9497107
commit
4bbe7f51cb
@ -35,26 +35,26 @@ do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# List all environment variables
|
||||||
|
printenv |
|
||||||
|
|
||||||
|
# Filter variables that start with USER_ENV_
|
||||||
|
grep -E '^USER_ENV_' |
|
||||||
|
|
||||||
|
# Remove the USER_ENV_ prefix
|
||||||
|
sed 's/^USER_ENV_//' |
|
||||||
|
|
||||||
|
# Append the result to /usr/bin/.bashrc
|
||||||
|
while IFS= read -r line
|
||||||
|
do
|
||||||
|
echo "export $line" | sudo -u ${HOME_USER} tee -a /usr/bin/.bashrc
|
||||||
|
done
|
||||||
|
|
||||||
USER="$HOME_USER"
|
USER="$HOME_USER"
|
||||||
if ! id -u $HOME_USER > /dev/null 2>&1; then
|
if ! id -u $HOME_USER > /dev/null 2>&1; then
|
||||||
sudo adduser --disabled-password --gecos "" --uid 1000 ${HOME_USER}
|
sudo adduser --disabled-password --gecos "" --uid 1000 ${HOME_USER}
|
||||||
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
sudo echo "$HOME_USER ALL=(ALL) NOPASSWD:ALL" | sudo tee -a /etc/sudoers.d/nopasswd > /dev/null
|
||||||
|
|
||||||
# List all environment variables
|
|
||||||
printenv |
|
|
||||||
|
|
||||||
# Filter variables that start with USER_ENV_
|
|
||||||
grep -E '^USER_ENV_' |
|
|
||||||
|
|
||||||
# Remove the USER_ENV_ prefix
|
|
||||||
sed 's/^USER_ENV_//' |
|
|
||||||
|
|
||||||
# Append the result to /usr/bin/.bashrc
|
|
||||||
while IFS= read -r line
|
|
||||||
do
|
|
||||||
echo "export $line" | sudo -u ${HOME_USER} tee -a /usr/bin/.bashrc
|
|
||||||
done
|
|
||||||
|
|
||||||
# Creating .vscode folder if it doesn't exist
|
# Creating .vscode folder if it doesn't exist
|
||||||
if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
|
if [ ! -d "/home/${HOME_USER}/.vscode" ]; then
|
||||||
sudo mkdir -p /home/${HOME_USER}/.vscode
|
sudo mkdir -p /home/${HOME_USER}/.vscode
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.22
|
3.0.23
|
Loading…
Reference in New Issue
Block a user