Skip to content

Commit 0a12acb

Browse files
authored
Merge pull request #95 from linuxserver/mod-helper
Add helper for mods
2 parents 7163312 + 237f551 commit 0a12acb

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
266266

267267
## Versions
268268

269+
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
269270
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
270271
* **29.11.21:** - Rebase to Ubuntu focal.
271272
* **16.09.21:** - Fix slow `chown` on large workspace (contents of workspace folder no longer chowned).

readme-vars.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ app_setup_block: |
7777
7878
# changelog
7979
changelogs:
80+
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
8081
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
8182
- { date: "29.11.21:", desc: "Rebase to Ubuntu focal." }
8283
- { date: "16.09.21:", desc: "Fix slow `chown` on large workspace (contents of workspace folder no longer chowned)." }

root/usr/local/bin/install-extension

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
_install=(/usr/local/bin/code-server "--extensions-dir" "/config/extensions" "--install-extension")
5+
6+
if [ "$(whoami)" == "abc" ]; then
7+
"${_install[@]}" "$@"
8+
else
9+
s6-setuidgid abc "${_install[@]}" "$@"
10+
fi

0 commit comments

Comments
 (0)