- Use
curlto get the JSON response for the latest release - Use
grepto find the line containing file URL - Use
cutandtrto extract the URL - Use
wgetto download it
curl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
Add a download button that auto-detects your visitor's OS and links to the latest binary from your GitHub releases. One script tag, no dependencies. Easy to configure: https://www.generouscorp.com/download-latest/
Source: https://github.com/danielraffel/download-latest