invocation
unison profile
unison path1 path2 # uses default profile, which should not have any roots
example config
configs live in ~/.unison and have file suffix .prf.
root = /path/to/one/dir/
root = ssh://host/relative/remote/path/
servercmd = /usr/bin/unison
# use ssh compression, should be faster
rshargs = -C
maxthreads = 2
ignore = Name .DS_Store
ignore = Name *.part
ignore = Path path/to/.cache
ignore patterns
ignore = pattern
where pattern is one of the following:
Regex regexp
Posix extended regular expression, anchored
Name name
matches any path in which the last component matches name
Path path
matches exactly the path path
for name and path arguments standard globbing conventions apply.
example makefile
to run all profiles put following makefile alongside profiles.
.NOTPARALLEL:
ignore_profiles := default.prf
profiles := $(filter-out $(ignore_profiles), $(wildcard *.prf))
.PHONY: all
all: $(profiles)
.PHONY: $(profiles)
$(profiles):
unison $@