Skip to content

Commit 1e80d02

Browse files
Restic 0.17 (#396)
* add support for restic 0.17 * update config for local tests
1 parent 80a757d commit 1e80d02

File tree

4 files changed

+377
-38
lines changed

4 files changed

+377
-38
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ generate-restic:
232232
$(RESTIC_GEN) --install $(RESTIC_DIR)0.14.0 --version=0.14.0 --commands $(RESTIC_CMD)
233233
$(RESTIC_GEN) --install $(RESTIC_DIR)0.15.0 --version=0.15.0 --commands $(RESTIC_CMD)
234234
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.0 --version=0.16.0 --commands $(RESTIC_CMD)
235+
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.1 --version=0.16.1 --commands $(RESTIC_CMD)
236+
$(RESTIC_GEN) --install $(RESTIC_DIR)0.16.4 --version=0.16.4 --commands $(RESTIC_CMD)
237+
$(RESTIC_GEN) --install $(RESTIC_DIR)0.17.0 --version=0.17.0 --commands $(RESTIC_CMD)
235238

236239
cp $(RESTIC_CMD) restic/commands.json
237240

examples/dev.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ self:
117117
schedule-log: "_schedule-log.txt"
118118
schedule-ignore-on-battery: true
119119
schedule-after-network-online: true
120+
skip-if-unchanged: true
120121

121122
run-before:
122123
- "echo DOW=`date +\"%u\"` >> {{ env }}"
@@ -339,3 +340,8 @@ empty-fields:
339340
keep-tag: ""
340341
group-by: ""
341342
tag: ""
343+
344+
nopwd:
345+
initialize: true
346+
repository: "/Volumes/RAMDisk/{{ .Profile.Name }}"
347+
insecure-no-password: true

restic/commands.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ var (
150150
manSectionStart = regexp.MustCompile(`^\.SH ([A-Z 0-9]+)$`)
151151
manParagraphStart = regexp.MustCompile(`^\.PP$`)
152152
manEscapeSequence = regexp.MustCompile(`(\\f[A-Z]|\\)`)
153+
lineCleanup = regexp.MustCompile("([`]{2,})")
153154
)
154155

155156
func parseStream(input io.Reader, commandName string) (cmd *command, err error) {
@@ -182,6 +183,7 @@ func parseStream(input io.Reader, commandName string) (cmd *command, err error)
182183
}
183184
} else {
184185
line = manEscapeSequence.ReplaceAllString(line, "")
186+
line = lineCleanup.ReplaceAllString(line, "")
185187

186188
switch section {
187189
case "DESCRIPTION":

0 commit comments

Comments
 (0)