yonggekkk / warp-yg

warp多功能一键脚本,支持warp-go与wgcf切换,无限生成warp配置文件,支持升级warp+、warp团队账户,查看VPS本地IP、netflix、chatgpt解锁状态
3.72k stars 966 forks source link

[Suggestion] 优化下载程序部分的代码逻辑 #62

Closed wisdgod closed 1 year ago

wisdgod commented 1 year ago

当我使用https://gitlab.com/rwkgyg/CFwarp/raw/main/point/endip.sh时,每一次都需要下载warp优选程序,如果您未来不再更新程序,我建议采用下面的代码:

cfwarpIP(){
if [[ ! -f "warpendpoint" ]]; then
echo "下载warp优选程序"
if [[ -n $cpu ]]; then
curl -L -o warpendpoint -# --retry 2 https://gitlab.com/rwkgyg/CFwarp/raw/main/point/$cpu
fi
fi
}
yonggekkk commented 1 year ago

ok。感谢建议。已更新