#!/bin/sh # rsync-dotmac.sh # v1.0, 2007/07/11 by Chris Pepper # Check for a newer version at: # # for h in mac1 mac2 do ssh $h rm -Rf ~/Library/Caches/com.apple.iCal ~/Library/Caches/iCal ~/Library/Caches/Metadata/iCal ~/Library/Preferences/com.apple.iCal.alarmsCache.plist ~/Library/Preferences/com.apple.iCal.AlarmScheduler.plist ~/Library/Preferences/com.apple.iCal.plist ~/Library/Preferences/com.apple.iCal.sources.plist ~/Library/Preferences/com.apple.iCalSync.AlarmScheduler.plist rsync -va --delete ~/Library/Application\ Support/AddressBook/ $h:"Library/Application\ Support/AddressBook/" rsync -va --delete ~/Library/Application\ Support/iCal/ $h:"Library/Application\ Support/iCal/" rsync -va --delete ~/Library/Calendars/ $h:Library/Calendars/ rsync -va --delete ~/Library/Safari/Bookmarks.plist $h:Library/Safari/Bookmarks.plist done # To use, enter your read-only hostnames on the 'for' line above. # They must, of course, be accessible from the system you run this script on. # The script pushes data (Address Book, iCal, and Safari bookmarks) from # a master to one or more read-only systems. It is intended as a free # replacement for a part of Apple's .Mac service that caused me some # frustration. # I wish Apple provided a way to tell those applications not to allow # (futile) changes on read-only systems, although with .Mac services # that should not be necessary. # I don't sync ~/Library/Keychains/, because my keychain items vary # between systems, so unidirectional sync would be suboptimal. # You may get warnings when going between OS versions; I have had no # trouble just ignoring them (so far). # If you get double birthdays, try disabling and re-enabling the # Birthdays calendar in iCal's Preferences.