-
Notifications
You must be signed in to change notification settings - Fork 12
/
common.sh
55 lines (41 loc) · 1.4 KB
/
common.sh
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
if [ -z "$DUPLICACY_PATH" ]; then
DUPLICACY_PATH="`which duplicacy 2>/dev/null || echo ""`"
fi
if [ -z "$RESTIC_PATH" ]; then
RESTIC_PATH="`which restic 2>/dev/null || echo ""`"
fi
if [ -z "$ATTIC_PATH" ]; then
ATTIC_PATH="`which attic 2>/dev/null || echo ""`"
fi
if [ -z "$DUPLICITY_PATH" ]; then
DUPLICITY_PATH="`which duplicity 2>/dev/null || echo ""`"
fi
if [ -z "$RDEDUP_PATH" ]; then
RDEDUP_PATH="`which rdedup 2>/dev/null || echo ""`"
fi
if [ -z "$RDUP_PATH" ]; then
RDUP_PATH="`which rdup 2>/dev/null || echo ""`"
fi
if [ -z "$RDEDUP_PATH" -o -z "$RDUP_PATH" ]; then
RDEDUP_PATH=""
RDUP_PATH=""
fi
if [ ! -z "$DUPLICITY_PATH" ]; then
if [ -z "$GPG_KEY" ]; then
echo "GPG_KEY must be set for duplicity to work properly"
DUPLICITY_PATH=""
fi
fi
BACKUP_DIR="`realpath ${TEST_DIR}/linux`"
DUPLICACY_STORAGE=${TEST_DIR}/linux-duplicacy-storage
RESTIC_STORAGE=${TEST_DIR}/linux-restic-storage
ATTIC_STORAGE=${TEST_DIR}/linux-attic-storage
DUPLICITY_STORAGE=${TEST_DIR}/linux-duplicity-storage
RDEDUP_STORAGE=${TEST_DIR}/linux-rdedup-storage
DUPLICACY_RESTORE=${TEST_DIR}/linux-duplicacy-restore
RESTIC_RESTORE=${TEST_DIR}/linux-restic-restore
ATTIC_RESTORE=${TEST_DIR}/linux-attic-restore
DUPLICITY_RESTORE=${TEST_DIR}/linux-duplicity-restore
RDEDUP_RESTORE=${TEST_DIR}/linux-rdedup-restore
# Used as the storage password throughout the tests
PASSWORD=12345678