Skip to content

Instantly share code, notes, and snippets.

@johnmichel
Created January 19, 2011 19:12
Show Gist options
  • Select an option

  • Save johnmichel/786660 to your computer and use it in GitHub Desktop.

Select an option

Save johnmichel/786660 to your computer and use it in GitHub Desktop.
AppleScript for updating to the latest daily build of Kod.
--Kod.app Daily Updater
--Author: John Michel
--Email: john.michel@gmail.com
--http://www.cowbird.org
--Version 0.1
--set local directory info
set remFile to "Kod.zip"
set locDir to "~/"
set locFile to "Kod.zip"
--download latest build
do shell script "curl http://kod.sivel.net/daily/" & remFile & " -o " & locDir & locFile
--unpack and copy
do shell script "unzip -o " & locDir & locFile & " -d " & locDir
--move existing Kod and copy new
try
do shell script "cp -pR /Applications/Kod.app /Applications/Kod.old.app"
do shell script "rm -R /Applications/Kod.app"
end try
do shell script "mkdir -p /Applications/Kod.app"
do shell script "mkdir -p /Applications/Kod.app/Contents"
do shell script "cp -pR " & locDir & "Kod.app/Contents /Applications/Kod.app"
--Cleanup folders and files
do shell script "rm -R " & locDir & "Kod*"
try
do shell script "rm -R /Applications/Kod.old.app"
end try
--display dialog "Kod has been updated"
--Run Kod
do shell script "open /Applications/Kod.app"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment