From 02f0b6f2cb0434ee864ed7ad8f15185a6cd4ffa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Sch=C3=A4r?= Date: Sat, 11 May 2024 11:50:52 +0200 Subject: [PATCH] Only put symlinks to vscode exts in skel --- .../hooks/live/2000-participant.hook.chroot | 11 +++++++++++ 1 file changed, 11 insertions(+) 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