After downloading and installing the most recent WebKit too much times, I wanted to update it with one simple command. Since I know a lot of languages, but most of them not too well, I ended up with two scripts. Not very flexible, but it works for me.
I save both scripts in my ~/bin folder. The WebKit image is saved on the desktop. If you have a better solution, give me a ring.
This one gets a link to the most recent (better: first) build of webkit, and echo’s it.
import urllib from xml.dom.minidom import parseString f = urllib.urlopen("http://nightly.webkit.org/builds/trunk/mac/rss") dom = parseString(f.read()) item = dom.getElementsByTagName("item")[0] link = item.getElementsByTagName("link")[0] print link.firstChild.nodeValue
This is a bash script which does all the work and can be called to update the WebKit installation. Note: I keep WebKit in my (personal) ~/Application folder.
#!/bin/bash curl `python ~/bin/webkiturl.py` -o ~/Desktop/lastest_webkit.dmg hdiutil mount ~/Desktop/lastest_webkit.dmg cp -Rf /Volumes/WebKit/*.app ~/Applications hdiutil detach `df | grep WebKit | perl -pe 's@^/dev/([a-zA-Z0-9]+).*@$1@'` rm ~/Desktop/lastest_webkit.dmg