V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
stdout

分享下载 vscode 国内镜像的脚本

  •  
  •   stdout · Oct 12, 2023 · 2842 views
    This topic created in 928 days ago, the information mentioned may be changed or developed.

    去 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"
    }
    
    2 replies    2023-10-13 08:41:04 +08:00
    lixiang2017
        1
    lixiang2017  
       Oct 12, 2023   ❤️ 1
    别点右上角那个大的"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
    ```
    yemoluo
        2
    yemoluo  
       Oct 13, 2023
    @lixiang2017 正解
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5457 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 09:31 · PVG 17:31 · LAX 02:31 · JFK 05:31
    ♥ Do have faith in what you're doing.