Skip to content

Instantly share code, notes, and snippets.

@thejimnicholson
Created December 30, 2022 23:13
Show Gist options
  • Save thejimnicholson/507636f51f2d8a04ac1c8dfed5672882 to your computer and use it in GitHub Desktop.
Save thejimnicholson/507636f51f2d8a04ac1c8dfed5672882 to your computer and use it in GitHub Desktop.
bash script to pull the latest rpm for tabby
#!/usr/bin/env bash
PROJECT='eugeny/tabby'
API_LATEST=https://api.github.com/repos/$PROJECT/releases/latest
TARGET=$(curl -s $API_LATEST | jq ' .assets[].browser_download_url' | grep 'linux-x64.rpm' | tr -d '"')
PACKAGE=$(basename $TARGET)
echo $TARGET
echo $PACKAGE
curl -s -o $PACKAGE --max-redirs 5 -L $TARGET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment