Created
July 20, 2017 21:52
-
-
Save skanga/f731b723e69e209b16c9a8ebd460177e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Download latest release of a specific file from a Github repo | |
REPO_OWNER='PowerShell' | |
REPO_NAME='Win32-OpenSSH' | |
ARTIFACT_NAME=OpenSSH-Win64.zip | |
ARTIFACT_URL=$(curl -sL https://api.github.com/repos/${REPO_OWNER}/${REPO_NAME}/releases/latest | jq --raw-output '.assets[] | .browser_download_url' | grep ${ARTIFACT_NAME}) | |
curl -sLO $ARTIFACT_URL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment