-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathunisyncrc.example
executable file
·98 lines (78 loc) · 2.51 KB
/
unisyncrc.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/bin/bash
location="$USER@$HOSTNAME" # must be unique for each host
locations=(user@home user@laptop user@work) # where I am
remotes=(user@server user@server user@server) # where to sync profiles to
unison_dirs=($HOME/.unison $HOME/.unison $HOME/.unison) # optional: to use unisons' *.prf files
# reduce ssh connection time and ask password/passphrase only once
# (control socket and remote will be added automatically)
# comment the following line to disable connection sharing
ssh_master=(ssh -N -M -S)
## logging and notifications
## specify a file for a short status summary of synchronized profiles
# summary=/tmp/unisync_summary
# conflict_log=/tmp/unison_conflicts # requires unison-merge
# if [[ -n DISPLAY ]] && type notify-send &>/dev/null ; then
# conflict_notify="notify-send -a unisync conflict:" # requires unison-merge
# sync_error_notify="notify-send -a unisync"
# fi
backup_args=(
-backup "Name *"
-backup "Name .*" # dot files
-backuploc local
-maxbackups 2
)
merge_args=(
-merge "Regex .* -> unison-merge newer CURRENT1 CURRENT2 NEW \
$conflict_log '$conflict_notify'"
)
ignoe_args=(
-ignore "Name *~"
-ignore "Name #*#"
-ignore "Name *.tmp"
)
# unison_args are passed to unison on every unison execution
unison_args=(
-sshargs "-C -S $ssh_socket"
-batch
-times
# -force newer
"${backup_args[@]}" # backup enabled
# "${merge_args[@]}" # automatic conflict resolution disabled
"${ignoe_args[@]}"
)
# variables
SYNC="/home/user/Sync"
# profiles
# profile 'unisyncrc' is treated specially: if it is updated during
# synchronization, its contents is re-read
profile_01=unisyncrc
local_01="$HOME"
remote_01="$SYNC"
args_01=(-path .unisyncrc)
profile_02=unison
local_02="$HOME/.unison"
remote_02="$SYNC/.unison"
args_02=(-ignore "Name ?*" -ignorenot "Name *.prf")
profile_10=shell
local_10="$HOME"
remote_10="$SYNC/configs"
args_10=(-path .bashrc -path .bash_profile -path .bash_logout)
profile_20=hg
local_20="$HOME"
remote_20="$SYNC/configs"
args_20=(-path .hgrc)
profile_21=git
local_21="$HOME"
remote_21="$SYNC/configs"
args_21=(-path .gitconfig)
profile_30=music
local_30="$HOME/Music"
remote_30=("$SYNC/HomeMusic" "$SYNC/LaptopMusic" "$SYNC/WorkMusic")
auto_30=false # synchronize on demand
profile_31=documents
local_31=("$HOME/Docs" "$HOME/Docs" "$HOME/HomeDocs")
remote_31="$SYNC/Docs"
# groups
group_configs=(shell hg git)
group_vcs_configs=(hg git)
group_data=(music documents)