Add helper for mods

This commit is contained in:
Roxedus 2021-12-29 21:31:35 +01:00
parent a5c367ef43
commit 77d0dcd32c
No known key found for this signature in database
GPG Key ID: EBC13557C4D91D7B
3 changed files with 12 additions and 0 deletions

View File

@ -252,6 +252,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
* **10.12.21:** - Update deprecated connectionToken arg.
* **30.11.21:** - Fix app folder permissions, add the optional sudo password vars.
* **29.11.21:** - Create `.profile` and `.bashrc` for the user.

View File

@ -61,6 +61,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
- { date: "10.12.21:", desc: "Update deprecated connectionToken arg." }
- { date: "30.11.21:", desc: "Fix app folder permissions, add the optional sudo password vars." }
- { date: "29.11.21:", desc: "Create `.profile` and `.bashrc` for the user." }

View File

@ -0,0 +1,10 @@
#!/usr/bin/with-contenv bash
# shellcheck shell=bash
_install=(/app/openvscode-server/server.sh "--extensions-dir" "/config/.vscode-remote/extensions" "--install-extension")
if [ "$(whoami)" == "abc" ]; then
"${_install[@]}" "$@"
else
s6-setuidgid abc "${_install[@]}" "$@"
fi