Skip to content

Instantly share code, notes, and snippets.

@p120ph37
Last active February 20, 2019 11:55
Show Gist options
  • Save p120ph37/8470353 to your computer and use it in GitHub Desktop.
Save p120ph37/8470353 to your computer and use it in GitHub Desktop.
This is the launchd.plist file that keeps my Dropbox and Google Drive folders synchronized.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key><string>local.gdrive-dropbox-sync</string>
<key>ProgramArguments</key>
<array>
<string>/bin/sh</string><string>-c</string>
<string>/usr/local/bin/unison \
-times \
-prefer=newer \
-owner \
-group \
-ignorelocks \
-terse \
-batch \
-ignore='Path .dropbox.cache' \
-ignore='Path .DS_Store' \
-ignore='Path Icon?' \
~/Google\ Drive/ \
~/Dropbox/</string>
</array>
<key>RunAtLoad</key><true/>
<key>WatchPaths</key>
<array>
<string>~/Google Drive</string>
<string>~/Dropbox</string>
</array>
<!--<key>StartInterval</key><integer>60</integer>-->
<key>ExitTimeOut</key><integer>0</integer>
<key>ThrottleInterval</key><integer>1</integer>
</dict>
</plist>
@louisrawlins
Copy link

Thank you! Saved me alot of confusion getting sync to work with unison. Exactly what I was looking for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment