1 要做的工作
1.1 获取vs code 的commit id
1.2
从https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable
下载vscode server
1.3
将vscode-server-linux-x64.tar.gz
上传到 server
1.4
将下载的vscode-server-linux-x64.tar.gz解压到~/.vscode-server/bin/${commit_id}
目录下
1.5
在~/.vscode-server/bin/${commit_id}
目录下创建一个文件,文件名为0
2.完整步骤
#!/bin/bash
if [ $# -lt 1 ]; then
echo "usage: ./download_vscode_server.sh <commit_id>"
exit 1
fi
# step 1:
commit_id=$1
# step 2: Download vs code server
wget --no-check-certificate "https://update.code.visualstudio.com/commit:${commit_id}/server-linux-x64/stable" -O /tmp/vscode-server-linux-x64.tar.gz
# step 3:
mkdir -p ~/.vscode-server/bin/${commit_id}
# step 4:
tar zxvf /tmp/vscode-server-linux-x64.tar.gz -C ~/.vscode-server/bin/${commit_id} --strip 1
rm -rf /tmp/vscode-server-linux-x64.tar.gz
# step 5:
touch ~/.vscode-server/bin/${commit_id}/0
标签:--,x64,server,vscode,linux,commit,id
From: https://www.cnblogs.com/panblink/p/17118860.html