Created
July 16, 2019 06:53
-
-
Save cecekpawon/92f6219f04c66ce44a8506538feefdc8 to your computer and use it in GitHub Desktop.
Github releases - for Slice - with love
This file contains hidden or 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
#!/bin/bash | |
owner=Acidanthera | |
repo=(AptioFixPkg AppleSupportPkg) | |
target=RELEASE #DEBUG | |
for r in "${repo[@]}" | |
do | |
json=$(curl -s https://api.github.com/repos/${owner}/${r}/releases/latest) | |
tag=$(echo "${json}" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/') | |
url=($(echo "${json}" | grep '"browser_download_url":' | sed -E 's/.*"([^"]+)".*/\1/')) | |
for u in "${url[@]}" | |
do | |
if [[ "${u}" == *"${target}"* ]]; then | |
echo "((( ${owner} | ${r} | ${tag} ))): ${u}" | |
fi | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment