Changes

Jump to navigation Jump to search
updated applescript, and fixed some typos
Line 52: Line 52:     
  -auto  
 
  -auto  
the user interface will not ask to confirm non-conflicts, but only ask questions about conflicts
+
if "auto" is set the user interface will not ask to confirm non-conflicts, but only ask questions about conflicts
 
  -batch  
 
  -batch  
the user interface will ask no questions at all; non-conlficts will be propogated, conflicts will be skipped
+
if "batch" is set the user interface will ask no questions at all; non-conlficts will be propogated, conflicts will be skipped
 
  -silent   
 
  -silent   
the textual interface will porint nothing at ell, except errors (automatically sets -batch TRUE)
+
if "silent", the textual interface will porint nothing at ell, except errors (automatically sets -batch TRUE)
 
  -times
 
  -times
synchronize the modification times?
+
"times" synchronizes the modification times?
-ignore 'Name .DS_Store"
+
-terse
 +
if "terse" is set, status messages are not reported, so only conflicts are reported.
 +
-ignore 'Name .DS_Store"
 
Unison will ignore all files with the name .DS_Store (On Mac OS X,  .DS_Store files encode only trivial appearance stuff like icon position, but .DS_Store files are changed everytime a folder is opened so frequently generate irrelevant conflicts.)
 
Unison will ignore all files with the name .DS_Store (On Mac OS X,  .DS_Store files encode only trivial appearance stuff like icon position, but .DS_Store files are changed everytime a folder is opened so frequently generate irrelevant conflicts.)
    
==AppleScript==
 
==AppleScript==
   
To avoid opening the terminal window, create the following AppleScript and save as an application.
 
To avoid opening the terminal window, create the following AppleScript and save as an application.
   −
  do shell script "unison /User/houpt/uniDisk ssh://houptlab.org/uniDisk -ui text -batch -times -ignore 'Name .DS_Store' "
+
  set resultsText to do shell script "unison /Users/houpt/uniDisk ssh://houptlab.org/uniDisk -ui text -batch -times -terse -ignore 'Name .DS_Store'"
 +
 +
-- display the results text in a new TextEdit window
 +
-- note that if "-terse" is set, then unison only returns a result if there are conflicts
 +
tell application "TextEdit"
 +
activate
 +
set NewDoc to make new document
 +
if (0 is length of resultsText) then
 +
set text of NewDoc to (date string of (current date)) & (time string of (current date)) & return & return & "Unison reports no conflicts."
 +
else
 +
set text of NewDoc to (date string of (current date)) & (time string of (current date)) & return & return & resultsText
 +
end if
 +
end tell
   −
Results of the synch will be silent, but will be stored in the "unison.log" file. If there are conflicts to be resolved, then the applescript will post a dialog window.
+
Results of the synch will be silent, but will be stored in the "unison.log" file. If there are conflicts to be resolved, then the applescript will post a TextEdit window.
    
==Conflicts==
 
==Conflicts==

Navigation menu