Pick of the Week - Nov 10 [Show all picks]
Path Finder 5 - A feature-laden Finder replacement
Submit Hint Search The Forums LinksStatsPollsFAQHeadlinesRSS
12,000 hints and counting!


Click here to return to the 'Automatically update WebKit via script and launchd' hint
The following comments are owned by whomever posted them. This site is not responsible for what they say.
Automatically update WebKit via script and launchd
Authored by: daaku on Mon, Aug 4 2008 at 5:56PM PDT
A simpler script:
#!/bin/sh

tmpdir=/tmp/webkit-nightly
URL=$(curl http://nightly.webkit.org/ | grep dmg | head -1 | perl -pe 's/.*(http.*dmg).*/$1/')
FILE=$(basename $URL)
mkdir -p $tmpdir &&
cd $tmpdir &&
curl $URL --remote-name &&
hdiutil attach -quiet $tmpdir/$FILE &&
mv /Applications/WebKit.app ~/.Trash/WebKit-`date +%Y-%m-%d_%H-%M-%s`.app/ &&
cp -R /Volumes/WebKit/WebKit.app /Applications/ &&
hdiutil detach -quiet /Volumes/WebKit &&
echo Installed $FILE


[ Reply to This | # ]