iankelling.org
/
git
/
distro-setup
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix missing sieve links on new systems
[distro-setup]
/
myunison
diff --git
a/myunison
b/myunison
index d8f23bcf64464ac6336c4f5a530147e33cf534fd..f68ae34af1337111201affd1d8ff4279eec63ada 100755
(executable)
--- a/
myunison
+++ b/
myunison
@@
-1,16
+1,21
@@
-#!/bin/bash -l
+#!/bin/bash -l
x
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
set -eE -o pipefail
trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+# note, we could have done machine specific subvols,
+# but there were so few files, it just didn't seem
+# necessary to have an rw copy on those machines
+# which did not have the whole p subvol.
+
gen_args=()
gen_args=()
-do_snapshot=
tru
e
+do_snapshot=
fals
e
batch=false
while [[ $1 ]]; do
case $1 in
-ob) gen_args+=(--ours -b); batch=true; shift ;;
-b) gen_args+=(-b); batch=true; shift ;;
batch=false
while [[ $1 ]]; do
case $1 in
-ob) gen_args+=(--ours -b); batch=true; shift ;;
-b) gen_args+=(-b); batch=true; shift ;;
- -n) do_snapshot=
fals
e; shift ;;
+ -n) do_snapshot=
tru
e; shift ;;
-h|--help)
echo "$0: help is head of $BASH_SOURCE:"
head -n 30 "$BASH_SOURCE"
-h|--help)
echo "$0: help is head of $BASH_SOURCE:"
head -n 30 "$BASH_SOURCE"
@@
-56,7
+61,7
@@
if [[ ! -e $push_path ]]; then
fi
# note, i'd prefer to use /usr/local/bin, but it's not in arch's default
# path for root.
fi
# note, i'd prefer to use /usr/local/bin, but it's not in arch's default
# path for root.
-
scp
/usr/bin/unison-latest-stable root@$host:/usr/bin/unison
+
rsync -L
/usr/bin/unison-latest-stable root@$host:/usr/bin/unison
if $do_snapshot; then
unison-snapshot
if $do_snapshot; then
unison-snapshot
@@
-78,12
+83,15
@@
else
type -t $f &>/dev/null || f=unison-gtk2 # for arch
fi
type -t $f &>/dev/null || f=unison-gtk2 # for arch
fi
+
+ s ln -sTf ~/.unison /root/.unison
+
if s $f "$host"; then
if [[ $host == frodo ]]; then
# only send data to the machine i do full backups to
if s $f "$host"; then
if [[ $host == frodo ]]; then
# only send data to the machine i do full backups to
- p=/
q/
p/c/machine_specific/$HOSTNAME/.unison/
+ p=/p/c/machine_specific/$HOSTNAME/.unison/
s rsync -rlptgohi $p root@$host:$p
fi
s rsync -rlptgohi $p root@$host:$p
fi
- p=/
q/
p/c/machine_specific/$host/.unison/
+ p=/p/c/machine_specific/$host/.unison/
s rsync -rlptgohvi root@$host:$p $p
fi
s rsync -rlptgohvi root@$host:$p $p
fi