Skip to content

installing software from the latest GitHub software release

Attention

This is a suboptimal solution, relying on the assumption that the filenames of 64-bit .deb releases will contain 64.deb or 64-bit.deb. It is not certain to work.

Attention

A software file and a text file (islGHsr-log.txt) will be saved to the current directory.

For 64-bit .deb releases, use curl -s https://api.github.com/repos/foo/bar/releases/latest | jq -r '.assets[].browser_download_url' | grep '64.deb\|64-bit.deb' | xargs -n1 wget | tee ./islGHsr-log.txt && <./islGHsr-log.txt grep 'Saving to' | sed 's/^............//' | sed 's/.$//' | xargs -n1 sudo dpkg -i, where foo/bar is the username and repository name.

Bug

sed 's/^............//' is used instead of cut -cfoobar (where foobar is the number of characters to be removed from the beginning of the string) because cut does not properly handle UTF-8 characters.

examples

software repository
Brackets https://github.com/adobe/brackets
Pandoc1 https://github.com/jgm/pandoc

explanation

Note

This is an incomplete explanation.

  • curl -s https://api.github.com/repos/foo/bar/releases/latest | jq -r '.assets[].browser_download_url' | grep '64.deb\|64-bit.deb' usually (but not always) gets the URL of the software file to be downloaded.
    • grep '64.deb\|64-bit.deb' uses the regular expression alternation operator to return lines containing 64.deb or 64-bit.deb.
  • islGHsr-log.txt contains the log messages of wget.

licensing

No rights reserved: CC0 1.0.

prior work


  1. http://pandoc.org/installing.html