比如这个命令 wget https://github.com/p4gefau1t/trojan-go/releases/download/v0.5.1/trojan-go-linux-amd64.zip 0.5.1一直在变,有办法都是下载最新版吗?把0.5.1换成latest貌似不行 |
自己去GitHub仓库改一下链接不就好了 |
https://docs.github.com/en/repos … linking-to-releases |
releases/latest/download/
这样就行了 |
复制代码 |
trojanver=`curl -L -s https://github.com/p4gefau1t/trojan-go/tags | grep tar.gz | head -1 | awk -F ‘"’ ‘{print $4}’ | awk -F ‘/’ ‘{print $7}’ | sed -e ‘[email protected]@@g’` && wget https://github.com/p4gefau1t/trojan-go/releases/download/$trojanver/trojan-go-linux-amd64.zip |