diff --git a/os/layers/participant/hooks/live/2000-participant.hook.chroot b/os/layers/participant/hooks/live/2000-participant.hook.chroot index 1a45aa6..ae7268e 100755 --- a/os/layers/participant/hooks/live/2000-participant.hook.chroot +++ b/os/layers/participant/hooks/live/2000-participant.hook.chroot @@ -21,6 +21,17 @@ for ext in $VSCODE_EXTENSIONS; do done chown -R root:root /etc/skel/.vscode rm -rf /tmp/vsc.tmp +# Move extensions elsewhere and install symlinks in /etc/skel. +# This speeds up user creation and saves space. +mkdir /usr/local/lib/vscode-extensions +pushd /etc/skel/.vscode/extensions +for ext in *; do + if [ -d "$ext" ]; then + mv "$ext" /usr/local/lib/vscode-extensions/ + ln -s "/usr/local/lib/vscode-extensions/$ext" "$ext" + fi +done +popd # Enable codeblocks template. sed -i 's|// project wizards|RegisterWizard(wizProject, _T("soi"), _T("A SOI task"), _T("Console"));|' /usr/share/codeblocks/templates/wizard/config.script