mirror of
https://github.com/wavetermdev/dev.commandline.waveterm.git
synced 2026-08-05 13:46:53 -07:00
Add extension point for tools
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
shopt -s nullglob
|
||||||
|
|
||||||
FIRST_RUN="${XDG_CONFIG_HOME}/flatpak-vscode-first-run"
|
FIRST_RUN="${XDG_CONFIG_HOME}/flatpak-vscode-first-run"
|
||||||
|
|
||||||
@@ -13,6 +14,30 @@ if [ ! -f ${FIRST_RUN} ]; then
|
|||||||
touch ${FIRST_RUN}
|
touch ${FIRST_RUN}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
PYTHON_SITEDIR=$(python3 <<EOFPYTHON
|
||||||
|
import os
|
||||||
|
import site
|
||||||
|
print(os.path.relpath(site.getusersitepackages(), site.getuserbase()))
|
||||||
|
EOFPYTHON
|
||||||
|
)
|
||||||
|
|
||||||
|
for tool_dir in /app/tools/*; do
|
||||||
|
tool_bindir=$tool_dir/bin
|
||||||
|
if [ -d "$tool_bindir" ]; then
|
||||||
|
msg "Adding $tool_bindir to PATH"
|
||||||
|
export PATH=$PATH:$tool_bindir
|
||||||
|
fi
|
||||||
|
tool_pythondir=$tool_dir/$PYTHON_SITEDIR
|
||||||
|
if [ -d "$tool_pythondir" ]; then
|
||||||
|
msg "Adding $tool_pythondir to PYTHONPATH"
|
||||||
|
if [ -z "$PYTHONPATH" ]; then
|
||||||
|
export PYTHONPATH=$tool_pythondir
|
||||||
|
else
|
||||||
|
export PYTHONPATH=$PYTHONPATH:$tool_pythondir
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
if [ "$FLATPAK_ENABLE_SDK_EXT" = "*" ]; then
|
if [ "$FLATPAK_ENABLE_SDK_EXT" = "*" ]; then
|
||||||
SDK=()
|
SDK=()
|
||||||
for d in /usr/lib/sdk/*; do
|
for d in /usr/lib/sdk/*; do
|
||||||
|
|||||||
@@ -27,6 +27,12 @@ finish-args:
|
|||||||
- --filesystem=xdg-config/kdeglobals:ro
|
- --filesystem=xdg-config/kdeglobals:ro
|
||||||
- --talk-name=com.canonical.AppMenu.Registrar
|
- --talk-name=com.canonical.AppMenu.Registrar
|
||||||
- --talk-name=com.canonical.AppMenu.Registrar.*
|
- --talk-name=com.canonical.AppMenu.Registrar.*
|
||||||
|
add-extensions:
|
||||||
|
com.visualstudio.code.tool:
|
||||||
|
directory: tools
|
||||||
|
subdirectories: true
|
||||||
|
add-ld-path: lib
|
||||||
|
no-autodownload: true
|
||||||
cleanup:
|
cleanup:
|
||||||
- /include
|
- /include
|
||||||
- /lib/pkgconfig
|
- /lib/pkgconfig
|
||||||
@@ -53,6 +59,7 @@ modules:
|
|||||||
- ARCH_TRIPLE=$(gcc --print-multiarch) && cp /usr/lib/${ARCH_TRIPLE}/libbfd-*.so
|
- ARCH_TRIPLE=$(gcc --print-multiarch) && cp /usr/lib/${ARCH_TRIPLE}/libbfd-*.so
|
||||||
/app/lib
|
/app/lib
|
||||||
- ARCH_TRIPLE=$(gcc --print-multiarch) && ln -s /usr/lib/${ARCH_TRIPLE}/libtinfo.so/app/lib/libtinfo.so.5
|
- ARCH_TRIPLE=$(gcc --print-multiarch) && ln -s /usr/lib/${ARCH_TRIPLE}/libtinfo.so/app/lib/libtinfo.so.5
|
||||||
|
- mkdir /app/tools
|
||||||
sources:
|
sources:
|
||||||
- type: script
|
- type: script
|
||||||
dest-filename: apply_extra
|
dest-filename: apply_extra
|
||||||
|
|||||||
Reference in New Issue
Block a user