79 lines
1.5 KiB
C
79 lines
1.5 KiB
C
#include "../commands.h"
|
|
|
|
#include <fx/cmdline/cmd.h>
|
|
|
|
enum {
|
|
OPT_REPO,
|
|
OPT_REPO_PATH,
|
|
OPT_LOCATION,
|
|
OPT_LOCATION_CHANNEL,
|
|
OPT_LOCATION_COMPONENT,
|
|
|
|
ARG_PACKAGE_PATH,
|
|
};
|
|
|
|
static int package_add(
|
|
const fx_command *self,
|
|
const fx_arglist *opt,
|
|
const fx_array *args)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
FX_COMMAND(CMD_PACKAGE_ADD, CMD_PACKAGE)
|
|
{
|
|
FX_COMMAND_NAME("add");
|
|
FX_COMMAND_SHORT_NAME('A');
|
|
FX_COMMAND_DESC("add a package to a repository.");
|
|
FX_COMMAND_FLAGS(FX_COMMAND_SHOW_HELP_BY_DEFAULT);
|
|
FX_COMMAND_FUNCTION(package_add);
|
|
|
|
FX_COMMAND_HELP_OPTION();
|
|
|
|
FX_COMMAND_OPTION(OPT_LOCATION)
|
|
{
|
|
FX_OPTION_LONG_NAME("location");
|
|
FX_OPTION_SHORT_NAME('L');
|
|
FX_OPTION_DESC(
|
|
"the channel and component to add the package to.");
|
|
|
|
FX_OPTION_ARG(OPT_LOCATION_CHANNEL)
|
|
{
|
|
FX_ARG_NAME("channel");
|
|
FX_ARG_DESC("the channel to add the package to.");
|
|
FX_ARG_NR_VALUES(1);
|
|
}
|
|
|
|
FX_OPTION_ARG(OPT_LOCATION_COMPONENT)
|
|
{
|
|
FX_ARG_NAME("component");
|
|
FX_ARG_DESC(
|
|
"the channel component to add the package to.");
|
|
FX_ARG_NR_VALUES(1);
|
|
}
|
|
}
|
|
|
|
FX_COMMAND_OPTION(OPT_REPO)
|
|
{
|
|
FX_OPTION_LONG_NAME("repo");
|
|
FX_OPTION_SHORT_NAME('R');
|
|
FX_OPTION_DESC(
|
|
"the path to the root of the repository to add the "
|
|
"package(s) to.");
|
|
|
|
FX_OPTION_ARG(OPT_REPO_PATH)
|
|
{
|
|
FX_ARG_NAME("path");
|
|
FX_ARG_DESC("the path to the repository root.");
|
|
FX_ARG_NR_VALUES(1);
|
|
}
|
|
}
|
|
|
|
FX_COMMAND_ARG(ARG_PACKAGE_PATH)
|
|
{
|
|
FX_ARG_NAME("package");
|
|
FX_ARG_DESC("the path to the package(s) to add.");
|
|
FX_ARG_NR_VALUES(1);
|
|
}
|
|
}
|