Skip to content

Instantly share code, notes, and snippets.

View rahulkj's full-sized avatar

Rahul Jain rahulkj

  • VMware
  • Dallas, TX
View GitHub Profile
get_latest_release() {
DOWNLOAD_URL=$(curl --silent "https://api.github.com/repos/$1/releases/latest" | \
jq -r \
--arg flavor $2 '.assets[] | select(.name | contains($flavor)) | .browser_download_url')
echo $DOWNLOAD_URL
}
get_latest_release "cloudfoundry-incubator/credhub-cli" "linux"

Keybase proof

I hereby claim:

  • I am rahulkj on github.
  • I am rahulkj (https://keybase.io/rahulkj) on keybase.
  • I have a public key whose fingerprint is 071D 7221 17EB C5D9 4E96 93FC DB75 927F 7A84 5B27

To claim this, I am signing this object: