mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-06-19 04:18:11 -06:00
Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
d9df63f836
|
|||
c9799b9a77
|
|||
de3fda3c09
|
@ -31,7 +31,8 @@ sed 's/^GLOBAL_ENV_//' |
|
|||||||
while IFS= read -r line
|
while IFS= read -r line
|
||||||
do
|
do
|
||||||
if ! grep -q "^${line%=*}=" /etc/environment; then
|
if ! grep -q "^${line%=*}=" /etc/environment; then
|
||||||
echo "export $line" | sudo tee -a /etc/environment
|
echo "" >> /etc/environment
|
||||||
|
echo "export $line" >> /etc/environment
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -47,6 +48,7 @@ sed 's/^USER_ENV_//' |
|
|||||||
# Append the result to /usr/bin/.bashrc
|
# Append the result to /usr/bin/.bashrc
|
||||||
while IFS= read -r line
|
while IFS= read -r line
|
||||||
do
|
do
|
||||||
|
echo "" >> /usr/bin/.bashrc
|
||||||
echo "export $line" >> /usr/bin/.bashrc
|
echo "export $line" >> /usr/bin/.bashrc
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -74,7 +76,11 @@ fi
|
|||||||
# Find .sh files in /usr/bin/custom-scripts and execute them in order
|
# Find .sh files in /usr/bin/custom-scripts and execute them in order
|
||||||
for script in $(find /usr/bin/custom-scripts -name "*.sh" | sort); do
|
for script in $(find /usr/bin/custom-scripts -name "*.sh" | sort); do
|
||||||
chmod +x $script
|
chmod +x $script
|
||||||
|
if [[ $script == *"sudo"* ]]; then
|
||||||
|
sudo -u $HOME_USER bash -c "source /etc/environment; sudo $script"
|
||||||
|
else
|
||||||
sudo -u $HOME_USER bash -c "source /etc/environment; $script"
|
sudo -u $HOME_USER bash -c "source /etc/environment; $script"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Move the .bashrc file to the user's home directory
|
# Move the .bashrc file to the user's home directory
|
||||||
|
@ -1 +1 @@
|
|||||||
3.0.24
|
3.0.27
|
Reference in New Issue
Block a user