norgbackup/norg/borg/execute.nim

13 lines
262 B
Nim
Raw Normal View History

2024-08-19 03:21:46 +02:00
import strutils
import strformat
import ../model/command_type
import ../utils/run
export run
2024-08-19 03:21:46 +02:00
proc genCommand*(cmd: string, repo: string, others: seq[string]): string =
let args = others.join(" ")
let cmd = fmt"{BORG_BIN} {cmd} {repo} {args}"
return cmd