Add helper for mods

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

View File

@ -266,6 +266,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.
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
* **29.11.21:** - Rebase to Ubuntu focal.
* **16.09.21:** - Fix slow `chown` on large workspace (contents of workspace folder no longer chowned).

View File

@ -77,6 +77,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
- { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." }

View File

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