blob: 7623e9be87eb1344c6713b1f530c48f3743a9d00 (
plain)
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
|
#!/bin/bash
#
# sync code or home folder across systems
#
BASENAME="`basename $0`"
DEST="$1"
UNISON="unison-2.32.52"
if [ ! -z "$DEST" ]; then
if [ "$BASENAME" == "sync-code" ]; then
profile="$DEST-code"
elif [ "$BASENAME" == "sync-irssi" ]; then
profile="$DEST-irssi"
else
profile="$DEST-home"
fi
if [ -f "$HOME/.unison/$profile.prf" ]; then
$UNISON $profile
else
echo "No such profile $HOME/.unison/$profile.prf"
exit 1
fi
fi
|