{"id":557156,"date":"2022-06-29T00:22:23","date_gmt":"2022-06-28T16:22:23","guid":{"rendered":"http:\/\/4563.org\/?p=557156"},"modified":"2022-06-29T00:22:23","modified_gmt":"2022-06-28T16:22:23","slug":"wget%e6%80%8e%e4%b9%88%e4%b8%8b%e8%bd%bdgithub%e7%9a%84latest-releases%ef%bc%8c%e8%80%8c%e4%b8%8d%e6%98%af%e5%af%b9%e5%ba%94%e7%9a%84%e7%89%88%e6%9c%ac%e5%8f%b7%ef%bc%9f%e6%83%b3","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=557156","title":{"rendered":"wget\u600e\u4e48\u4e0b\u8f7dGitHub\u7684latest releases\uff0c\u800c\u4e0d\u662f\u5bf9\u5e94\u7684\u7248\u672c\u53f7\uff1f\u60f3&#8230;."},"content":{"rendered":"\n<p>  \t\t\t\t\t<strong>\u817e\u8baf\u4e916\u6298\u8d2d<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3>wget\u600e\u4e48\u4e0b\u8f7dGitHub\u7684latest releases\uff0c\u800c\u4e0d\u662f\u5bf9\u5e94\u7684\u7248\u672c\u53f7\uff1f\u60f3&#8230;.<\/h3>\n<p>  \t\t \u672c\u5e16\u6700\u540e\u7531 \u817e\u8baf\u4e916\u6298\u8d2d \u4e8e 2022-6-28 23:09 \u7f16\u8f91 <\/p>\n<p> \u60f3\u6bcf\u6b21\u90fd\u4e0b\u8f7d\u6700\u65b0\u7248<\/p>\n<p>  https:\/\/docs.github.com\/cn\/repositories\/releasing-projects-on-github\/linking-to-releaseshttps:\/\/cdn.jsdelivr.net\/gh\/master-of-forums\/master-of-forums\/public\/images\/patch.gif\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u6cd5\u5916\u72c2\u5f92\u5f20\u4e09<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5375\u800c\u53d1\u73b0releases\u6587\u4ef6\u4e2d\u5305\u542b\u7248\u672c\u53f7\u3002\u3002\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>minick<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u53bb\u627e\u5bf9\u5e94\u7684\u4e0b\u5c31\u884c\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>nop<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u5982\u679c\u662f\u751f\u4ea7\u7528\u9014\uff0c\u53ef\u4ee5\u641e\u4e2aphp\u4e2d\u8f6c\u4e00\u4e0b  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>Laa<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u53c2\u8003 https:\/\/api.github.com\/repos\/shadowsocks\/shadowsocks-rust\/releases\/latest\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u4f60\u5927\u7237<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t\u6709\u4e9b\u5305\u540d\u5c31\u6709\u7248\u672c\u53f7\uff0c\u6240\u4ee5\u8fd9\u79cd\u53ea\u9002\u7528\u4e8e\u5305\u540d\u4e0d\u542b\u7248\u672c\u53f7\u7684\u60c5\u51b5\u3002\t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>\u817f\u6bdb\u98d8\u98d8<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\t#!\/bin\/bash<\/p>\n<p>  VER=&quot;$(curl -s https:\/\/api.github.com\/repos\/caddyserver\/caddy\/releases\/latest | sed &#8216;y\/,\/n\/&#8217; | grep tag_name | awk -F &#8216;&quot;&#8217; &#8216;{print $4}&#8217;)&quot;<br \/>  CUR_VER=&quot;$($HOME\/caddy\/caddy version | cut -d &quot; &quot; -f1)&quot;<\/p>\n<p>  if [[ &quot;$VER&quot; == &quot;$CUR_VER&quot; ]] ; then<br \/>  echo &quot;Lastest version $VER is already installed,exiting&#8230;&quot;<br \/>  exit<br \/>  fi<\/p>\n<p>  ARCH=$(uname -m)<br \/>  VDIS=&quot;amd64&quot;<\/p>\n<p>  if [[ &quot;$ARCH&quot; == &quot;i686&quot; ]] || [[ &quot;$ARCH&quot; == &quot;i386&quot; ]]; then<br \/>  VDIS=&quot;386&quot;<br \/>  elif [[ &quot;$ARCH&quot; == *&quot;armv8&quot;* ]] || [[ &quot;$ARCH&quot; == &quot;aarch64&quot; ]]; then<br \/>  VDIS=&quot;arm64&quot;<br \/>  fi<\/p>\n<p>  mkdir -p \/tmp\/caddy<\/p>\n<p>  echo &quot;Installing Caddy ${VER} on ${ARCH}&quot;<br \/>  DOWNLOAD_LINK=&quot;https:\/\/github.com\/caddyserver\/caddy\/releases\/download\/${VER}\/caddy_${VER##*v}_linux_${VDIS}.tar.gz&quot;<\/p>\n<p>  echo &quot;Downloading ${DOWNLOAD_LINK} directly.&quot;<br \/>  curl -L -H &quot;Cache-Control: no-cache&quot; -o &quot;\/tmp\/caddy\/caddy.tar.gz&quot; ${DOWNLOAD_LINK}<\/p>\n<p>  echo &quot;Extracting Caddy package to \/tmp\/caddy\/.&quot;<br \/>  tar zxvf &quot;\/tmp\/caddy\/caddy.tar.gz&quot; -C &quot;\/tmp\/caddy\/&quot;<\/p>\n<p>  rm $HOME\/caddy\/caddy<\/p>\n<p>  cp &quot;\/tmp\/caddy\/caddy&quot; &quot;$HOME\/caddy\/caddy&quot;  \t\t\t\t<\/p>\n<p>  \t\t\t\t\t<strong>loveqianool<\/strong>  \t\t\t\t\u5927\u4f6c\u6709\u8bdd\u8bf4 : \t<\/p>\n<h3><\/h3>\n<p>  \t\twget -qO- &quot;https:\/\/api.github.com\/repos\/shadowsocks\/shadowsocks-rust\/releases&quot; | grep -m 1 &#8216;&quot;tag_name&quot;:&#8217; | sed -E &#8216;s\/.*&quot;([^&quot;]+)&quot;.*\/1\/&#8217;  \t\t\t  <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u817e\u8baf\u4e916\u6298\u8d2d \u5927\u4f6c\u6709\u8bdd\u8bf4 : wg&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/557156"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=557156"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/557156\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=557156"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=557156"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=557156"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}