Created
January 17, 2022 11:07
-
-
Save GuillaumeDesforges/1c499ab25c53edc0a1ca6cf2faacfe87 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for dir in ~/.vscode-server*/bin/* | |
do | |
node=$dir/node | |
echo Fixing $node | |
rm -v $node | |
ln -vs $(which node) $node | |
rm -vf $dir/vscode-remote-lock* | |
done | |
GCCLIB=$(dirname $(gcc -print-file-name=libstdc++.so.6)) | |
LOADER=$(dirname $(gcc -print-file-name=ld-linux-x86-64.so.2)) | |
find ~/.vscode*/extensions/ ~/.config/Code -type f -perm -100 -print0 | xargs -0 file \ | |
| grep 'interpreter /lib' | cut -d: -f1 | while read f; do | |
echo "Patching $f" >&2 | |
patchelf --set-interpreter "$LOADER" "$f" | |
# RPATH=$(patchelf --print-rpath "$f") | |
# patchelf --set-rpath "${RPATH+RPATH:}$GCCLIB" "$f" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment