Created
December 30, 2022 23:13
-
-
Save thejimnicholson/507636f51f2d8a04ac1c8dfed5672882 to your computer and use it in GitHub Desktop.
bash script to pull the latest rpm for tabby
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
#!/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