claugeas/main.cpp

27 lines
754 B
C++

#include <iostream>
#include "AugSettings.h"
#include "AugFuncs.h"
// Testing and training using augeas with C++
// https://github.com/hercules-team/augeas/blob/master/tests/test-api.c
int main(int argc, char *argv[]) {
//testGet();
auto testSettings = AugSettings {
.root = "../root",
.loadPath = "/opt/homebrew/share/augeas/lenses/dist",
};
auto instance = AugFuncs();
instance.printPreview(testSettings, "/files/etc/hosts/1", "/etc/hosts");
//printPreview("/files/etc/ssh/sshd_config/*", "/etc/ssh/sshd_config");
instance.printAugTree(testSettings, "/files/etc/hosts/*", "/etc/hosts");
instance.printAugTree(testSettings, "/files/etc/ssh/sshd_config/*", "/etc/ssh/sshd_config");
return 0;
}