Last active
August 4, 2018 04:03
-
-
Save Surendrajat/0648457e48da546e25a11240f80bfce7 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
#!/bin/bash | |
user= | |
pass= | |
latest_version=TWRP-3.2.3 | |
###### file containing github links for all device trees | |
file=all.url | |
curl -u "$user:$pass" -s "https://api.github.com/users/TwrpBuilder/repos?per_page=1000" | grep -w clone_url | grep -o '[^"]\+://.\+.git' > $file | |
while IFS= read -r line; do | |
repo="$(echo $line | cut -d / -f5 | cut -d . -f1)" | |
asset=$(curl -u "$user:$pass" --silent "https://api.github.com/repos/TwrpBuilder/$repo/releases/latest" | jq -r '.assets[0].name') | |
if [[ ! $asset == $latest_version-* ]]; then | |
echo $line | |
fi | |
done < "$file" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment