去 vscode 官网下载太慢了。写了个简单的函数,分享下
cmd_download()
{
cdn='vscode.cdn.azure.cn'
orig_url='https://code.visualstudio.com/sha/download?build=stable&os=linux-x64'
cur_url=$(curl -ILs -o /dev/null -w '%{url_effective}\n' "$orig_url")
echo "$cur_url"
new_url=$(sed "s#https://.*/stable#https://$cdn/stable#g" <<< $cur_url)
echo "$new_url"
wget -c "$new_url"
}
1
lixiang2017 2023-10-12 22:56:35 +08:00
别点右上角那个大的"Download"按钮,那个没走 CDN ,贼慢。
在详细版本的页面里面( https://code.visualstudio.com/updates/v1_83 )选择,两秒就下好了。在第三行 ```text Downloads: Windows: User System Arm64 | Mac: Universal Intel silicon | Linux: deb rpm tarball Arm snap ``` |
2
GTim 2023-10-13 08:41:04 +08:00
@lixiang2017 正解
|