Last active
October 16, 2024 19:09
-
-
Save JacobTDC/dfbad72c1328799962fdff9cb2a3cd17 to your computer and use it in GitHub Desktop.
A script to install and run VS Code on Termux
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
| Object.defineProperty(process, "platform", { | |
| get() { | |
| return "linux" | |
| }, | |
| }) |
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
| #!/data/data/com.termux/files/usr/bin/bash | |
| if ! dpkg -s nodejs-lts > /dev/null 2>&1; then | |
| echo code-server requires nodejs-lts. | |
| exit 1 | |
| fi | |
| export NODE_OPTIONS="--require android-as-linux.js" | |
| export VSCODE_APPDATA="$HOME/.local/share" | |
| exec npm exec -- code-server@latest $@ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment