mirror of
https://github.com/aleleba/aleleba-vscode-dockerfile-configuration.git
synced 2025-01-09 13:16:48 -06:00
Adding to bash the functionality to install extensions from array. Updating to version 1.0.15
This commit is contained in:
parent
e0bb4bfa2f
commit
d5e345fb48
@ -7,6 +7,23 @@ addgroup nonroot
|
||||
adduser --disabled-password --gecos "" ${HOME_USER}
|
||||
echo "${HOME_USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||
|
||||
# Check if the data.json file exists
|
||||
if [ -f "/home/extensions.json" ]; then
|
||||
# Read the JSON file into a variable
|
||||
jsonExtensions=$(cat /home/extensions.json)
|
||||
|
||||
# Use jq to extract the array elements
|
||||
extensions=$(echo $jsonExtensions | jq -r '.[]')
|
||||
|
||||
# Loop through the extensions and process each element
|
||||
for extension in $extensions; do
|
||||
echo "Installing extension: $extension"
|
||||
sudo su - ${HOME_USER} -c "code --install-extension $extension"
|
||||
done
|
||||
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
|
||||
|
@ -1 +1 @@
|
||||
1.0.14
|
||||
1.0.15
|
Loading…
Reference in New Issue
Block a user