Don't like ads? PRO users don't see any ads ;-)
Guest

Mac OS X hawkthorne updater

By: a guest on Jun 26th, 2012  |  syntax: Bash  |  size: 0.38 KB  |  hits: 439  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #! /bin/bash
  2.  
  3. ZIPFILE=hawkthorne-osx.zip
  4. TARG="$HOME/Desktop"
  5.  
  6. if [ -z $1 ]
  7. then
  8.     text=`curl http://www.reddit.com/user/britta-bot`
  9.     VER=`echo $text | grep -o "v[0-9]*\.[0-9]*\.[0-9]*" | head -n 1`
  10. else
  11.     VER=$1
  12. fi
  13.  
  14. URL="https://s3.amazonaws.com/hawkthorne.journey.builds/$VER/hawkthorne-osx.zip"
  15. curl -o $ZIPFILE $URL
  16. unzip -o $ZIPFILE -d $TARG
  17. rm $ZIPFILE