2024-08-19 02:21:46 +01:00
|
|
|
import ../model/config_type
|
|
|
|
|
|
|
|
import execute
|
|
|
|
|
|
|
|
proc pruneRepo*(nc: NorgConfig, repo: Repository): int =
|
2024-08-23 12:04:27 +01:00
|
|
|
var cmd = genCommand(cmd = "prune", repo = repo.path, further_args = nc.args.further_args)
|
2024-08-19 02:21:46 +01:00
|
|
|
cmd.addPruneOptions(nc.maintenance)
|
|
|
|
return run cmd
|
2024-08-23 14:08:14 +01:00
|
|
|
|
|
|
|
proc deleteArchive*(nc: NorgConfig, repo: Repository): int =
|
2024-08-27 19:27:36 +01:00
|
|
|
var cmd = genDeleteCommand(repo = repo.path, archive = nc.args.archive, further_args = nc.args.further_args)
|
2024-08-23 14:08:14 +01:00
|
|
|
return run cmd
|