Created
May 21, 2024 14:54
-
-
Save andrius/99819046f9ce2b503d153be254ffba50 to your computer and use it in GitHub Desktop.
script that open the vscode cli tunnel so you can access your vps from the laptop
This file contains 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
#!/usr/bin/env bash | |
cd /tmp | |
[ -f vscode_cli.tar.gz ] && rm -f vscode_cli.tar.gz | |
if [ ! -f code ]; then | |
# Based on the CPU architecture, download the appropriate version of Visual Studio Code and install it. | |
if [ "$(uname -m)" == "x86_64" ]; then | |
curl -Ls 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-arm64' --output vscode_cli.tar.gz | |
elif [ "$(uname -m)" == "aarch64" ]; then | |
curl -Ls 'https://code.visualstudio.com/sha/download?build=stable&os=cli-alpine-arm64' --output vscode_cli.tar.gz | |
fi | |
tar -xvf vscode_cli.tar.gz | |
fi | |
cd ~/code && /tmp/code tunnel --no-sleep --accept-server-license-terms --log error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment