2 * Copyright (c) 2007, Novell Inc.
4 * This program is licensed under the BSD license, read LICENSE.BSD
5 * for further information
18 #include "repo_diskusagexml.h"
19 #include "common_write.h"
24 fprintf(stderr, "\nUsage:\n"
25 "diskusagexml2solv [-a][-h][-n <attrname>]\n"
26 " reads a 'diskusage.xml' file from <stdin> and writes a .solv file to <stdout>\n"
27 " -h : print help & exit\n"
28 " -n <name>: save attributes as <name>.attr\n"
34 main(int argc, char **argv)
39 Pool *pool = pool_create();
40 Repo *repo = repo_create(pool, "<stdin>");
42 while ((c = getopt(argc, argv, "hn:")) >= 0)
57 if (repo_add_diskusagexml(repo, stdin, flags))
59 fprintf(stderr, "diskusagexml2solv: %s\n", pool_errstr(pool));
62 tool_write(repo, 0, attrname);