Restic init, list, backup, mount and restore working
This commit is contained in:
parent
7654fc04bf
commit
1007797119
3 changed files with 3 additions and 3 deletions
|
@ -35,7 +35,6 @@ proc parseEncryption*(enc_conf: TomlValueRef) =
|
|||
setEncryptionPassCommand(enc_conf{"encryption_passcommand"}.getStr(""))
|
||||
|
||||
proc parseConfigFile*(file: string): NorgConfig =
|
||||
norg_config = newNorgConfig()
|
||||
let in_conf = parsetoml.parseFile(file)
|
||||
norg_config.source_directories = parseSourceDirectories(in_conf)
|
||||
norg_config.repositories = parseRepositories(in_conf{"repositories"})
|
||||
|
|
|
@ -21,13 +21,14 @@ type
|
|||
actions*: Actions
|
||||
args*: NorgArgs
|
||||
|
||||
var norg_config*: NorgConfig
|
||||
|
||||
proc newNorgConfig*(): NorgConfig =
|
||||
var nc = NorgConfig()
|
||||
nc.maintenance = newMaintenance()
|
||||
return nc
|
||||
|
||||
var norg_config*: NorgConfig = newNorgConfig()
|
||||
|
||||
#proc `$`*(c: NorgConfig): string =
|
||||
# var msg: string = "Source Dirs: " & $c.source_directories & "\r\n"
|
||||
# msg &= "Repositories: " & $c.repositories & "\r\n"
|
||||
|
|
|
@ -7,8 +7,8 @@ import utils/actions
|
|||
|
||||
proc start() =
|
||||
parseArgs()
|
||||
norg_config = parseConfigFile(norg_args.config_file)
|
||||
norg_config.args = norg_args
|
||||
norg_config = parseConfigFile(norg_args.config_file)
|
||||
if norg_config.source_directories.len > 0 and norg_config.repositories.len > 0:
|
||||
run_actions(norg_config.actions.before_everything)
|
||||
for repo in norg_config.repositories:
|
||||
|
|
Loading…
Reference in a new issue