Loading

shell中下载最新版本或指定版本的办法(Dockerfile 中通用)

VER=$(curl -s https://api.github.com/repos/v2ray/v2ray-core/releases/latest | grep tag_name | cut -d '"' -f 4)
URL=$(curl -s https://api.github.com/repos/v2ray/v2ray-core/releases/tags/${VER} | jq .assets[0].browser_download_url | tr -d \")

需要安装curl jq 两个库

posted @ 2018-10-28 21:10  上官飞鸿  阅读(548)  评论(0编辑  收藏  举报