Skip to content

Instantly share code, notes, and snippets.

Revisions

  1. @steinwaywhw steinwaywhw revised this gist May 4, 2016. 1 changed file with 1 addition and 1 deletion.
    Original file line number Diff line number Diff line change
    @@ -8,5 +8,5 @@ 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 -
    | wget -qi -
    ```
  2. @steinwaywhw steinwaywhw revised this gist May 4, 2016. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion One Liner to Download the Latest Release from Github Repo.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,12 @@
    * Use `curl` to get the JSON response for the latest release
    * Use `grep` to find the line containing file URL
    * Use `cut` and `tr` to extract the URL
    * Use `wget` to download it

    ```bash
    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 -
    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 -
    ```
  3. @steinwaywhw steinwaywhw created this gist May 4, 2016.
    4 changes: 4 additions & 0 deletions One Liner to Download the Latest Release from Github Repo.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@

    ```bash
    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 -
    ```