-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathinstall-restic.sh
executable file
·206 lines (189 loc) · 10.8 KB
/
install-restic.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
#!/bin/bash
set -euo pipefail
VERSION="${VERSION-0.16.2}"
if [ $# -ne 0 ]; then
cat >&2 <<EOM
usage: $0
Install the restic backup program from Github, self update, and install
manpages and bash completion files in /usr/local/share/.
EOM
exit 1
fi
gpg --import <<EOM
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFRVIb8BEADUex/4rH/aeR3CN044zqFD45SKUh/8pC44Bw85iRSSE9xEZsLB
LUF6ZtT3HNXfxh7TRpTeHnXABnr8EtNwsmMjItDaSClf5jM0qKVfRIHBZ2N539oF
lHiCEsg+Q6kJEXHSbqder21goihfcjJBVKFX6ULgCbymOu03fzbhe/m5R57gDU2H
+gcgoI6a5ib11oq2pRdbC9NkEg7YXHbMlZ5s6fIAgklyDQqAlH8QNiRYcyC/4NrG
WXLwUTDssFn3hoJlAxZwj+dRZAit6Hgj2US05Ra/gJqZWzKyE2ywglO9sc2wD3sE
0Ti1tS9VJr7WNcZzVMXj1qBIlBkl4/E5tIiNEZ5BrAhmdSYbZvP2cb6RFn5clKh9
i+XpeB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2"
dl_url="https://github.com/restic/restic/releases/download"
wget "$dl_url/v${VERSION}/$basename"
wget "$dl_url/v${VERSION}/SHA256SUMS"{,.asc}
csum SHA256SUMS
read -rp "Check GPG output above and press enter to continue... "
bunzip2 "$basename"
execfile="$(basename "$basename" .bz2)"
sudo cp -v "$execfile" /usr/local/bin/restic
sudo chmod +x "/usr/local/bin/restic"
sudo /usr/local/bin/restic self-update
# update man files
sudo mkdir -vp /usr/local/share/man/man1/
sudo restic generate --man /usr/local/share/man/man1/
# update bash completion
sudo mkdir -vp /usr/local/share/bash-completion/completions
sudo restic generate --bash-completion /usr/local/share/bash-completion/completions/restic