code-server-extension-arguments add/update workflows

This commit is contained in:
aptalca
2023-04-13 15:37:09 -04:00
parent f33ea37b7d
commit 546edc292b
5 changed files with 58 additions and 69 deletions
@@ -1,20 +0,0 @@
#!/usr/bin/with-contenv bash
# Exit if no VsCode extensions are given
if [ -z ${VSCODE_EXTENSION_IDS+x} ]; then
echo "**** No VSCODE EXTENSIONS GIVEN****"
exit 0
fi
IFS='|'
VSCODE_EXTENSION_IDS=(${VSCODE_EXTENSION_IDS})
# Use newly available abstraction if available (>= v4.0.x), else fallback to old method.
if [ -x "$(command -v install-extension)" ]; then
for ID in "${VSCODE_EXTENSION_IDS[@]}"; do
install-extension ${ID}
done
else
for ID in "${VSCODE_EXTENSION_IDS[@]}"; do
s6-setuidgid abc code-server --user-data-dir /config/data --extensions-dir /config/extensions --install-extension ${ID}
done
fi