4 trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
8 while [[ $1 == -* ]]; do
10 -n) do_snapshot
=false
; shift ;;
12 -*) gen_args
+=($1) ; shift ;;
17 # arch and debian don't play nice with unison.
18 # "connection lost" on unison-gtk, with bignum errs in term,
19 # and simply freezing on cli, all means compiled under
20 # different ocaml versions.
21 # I had the great realization that unison is a self contained
22 # binary with no special runtime dependencies.
23 # However, I got a gtk error running the ui version.
24 # todo: I should test pushing my unison version instead
26 /p
/c
/subdir_files
/.unison
/gen
${gen_args[@]}
28 echo "$0: error: expected argument for hostname"
34 # todo: this doesn't deal with if the host is running arch too
36 # note, without bash, it prints some crap about tty
37 # on an uncustomized jessie install.
38 scp
/usr
/bin
/unison root@
$host:/usr
/local
/bin
42 ssh root@
$host unison-snapshot
46 type -t $f &>/dev
/null || f
=unison-gtk2
# for arch
48 if [[ $host == frodo
]]; then
49 # only send data to the machine i do full backups to
50 p
=/p
/c
/machine_specific
/$HOSTNAME/.unison
/
51 s rsync
-rlptgohi $p root@
$host:$p
53 p
=/p
/c
/machine_specific
/$host/.unison
/
54 s rsync
-rlptgohvi root@
$host:$p $p