Skip to content

Instantly share code, notes, and snippets.

@adithya2306
Created September 4, 2019 01:26
Show Gist options
  • Save adithya2306/30df346db82a3e11e95f7aa3b46675b9 to your computer and use it in GitHub Desktop.
Save adithya2306/30df346db82a3e11e95f7aa3b46675b9 to your computer and use it in GitHub Desktop.
keep checking for android 10 manifest release every 5 mins and sync when its ready
URL1="https://android.googlesource.com/platform/manifest/+/refs/tags/android-10.0.0_r1"
URL2="https://android.googlesource.com/platform/manifest/+/refs/tags/android10-release"
start_sync () {
echo -e "\nYO BOIS! ANDROID 10 IS OUT! INITIATING SYNC NOW! \n"
repo init -u "https://android.googlesource.com/platform/manifest" -b $(basename "$1")
repofastsync
exit 0
}
while true; do
if wget -q --spider $URL1; then start_sync $URL1
elif wget -q --spider $URL2; then start_sync $URL2
else
echo -e "ANDROID 10 AIN'T OUT YET! WAITING FOR 5 MINS... \n"
sleep 5m
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment