Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg info is now able to fetch information directly from a package Not yet finished. so far only : pkg info ~/pkgtest.tbz and pkg info -l ~/pkgtest.tbz are working
Baptiste Daroussin committed 15 years ago
commit d8c1981f4b83052747a1e028e3a6e4093baa8f4e
parent f7b221e
2 files changed +59 -0
added pkg/register.c
@@ -0,0 +1,54 @@
+
#include <err.h>
+
#include <stdio.h>
+
#include <pkg.h>
+
#include <string.h>
+
#include <sys/param.h>
+
#include <unistd.h>
+

+
#include "register.h"
+

+
int
+
cmd_register(int argc, char **argv)
+
{
+
	struct pkg *pkg;
+
	char ch;
+
	char *comment = NULL;
+
	char *descpath = NULL;
+
	char *oldplist = NULL;
+
	char *flattenedplist = NULL;
+
	char *prefix = NULL;
+
	char *mtree = NULL;
+
	char *origin = NULL;
+
	char *depends = NULL;
+

+
	while ((ch = getopt(argc, argv, "vc:d:f:p:P:m:o:O:")) != -1) {
+
		switch (ch) {
+
			case 'O':
+
			case 'v':
+
				/* IGNORE */
+
				break;
+
			case 'c':
+
				comment = strdup(optarg);
+
				break;
+
			case 'd':
+
				descpath = strdup(optarg);
+
				break;
+
			case 'f':
+
				oldplist = strdup(optarg);
+
				break;
+
			case 'p':
+
				prefix = strdup(optarg);
+
				break;
+
			case 'P':
+
				depends = strdup(optarg);
+
				break;
+
			case 'm':
+
				mtree = strdup(optarg);
+
				break;
+
			case 'o':
+
				origin = strdup(optarg);
+
				break;
+
		}
+
	}
+
	printf("%s\n", comment);
+
}
added pkg/register.h
@@ -0,0 +1,5 @@
+
#ifndef _REGISTER_H
+
#define _REGISTER_H
+

+
int cmd_register(int argc, char **argv);
+
#endif