norgbackup/norg/restic/execute.nim

13 lines
267 B
Nim
Raw Normal View History

import strutils
import strformat
import ../model/command_type
import ../utils/run
export run
proc genCommand*(cmd: string, repo: string, others: seq[string]): string =
let args = others.join(" ")
2024-08-23 11:30:36 +02:00
let cmd = fmt"{RESTIC_BIN} {cmd} -r {repo} {args}"
return cmd