Last active
December 15, 2015 10:39
-
-
Save yahelc/5246860 to your computer and use it in GitHub Desktop.
Bash script for Mac OS X to check, every 10 seconds, if the audio recordings for the #DOMA case are posted yet, and will open the page in Safari when it's posted.
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
while true | |
do | |
if (curl -is http://www.supremecourt.gov/oral_arguments/argument_audio_detail.aspx?argument=12-307 | grep -q "Location"); | |
then | |
echo "Not posted yet :(" && sleep 10; | |
else | |
open http://www.supremecourt.gov/oral_arguments/argument_audio_detail.aspx?argument=12-307; break; | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To run this on Mac OS X, open up the Terminal app, and paste the contents of this file. Once the recordings get posted, it will automatically open the page with the recording in your browser. You can leave Terminal on in the background; it'll open it and interrupt whatever you're doing.