#include <string>
#include <vector>
+#include <stdlib.h>
+
#include <apti18n.h>
/*}}}*/
return true;
}
/*}}}*/
-bool ShowHelp(CommandLine &, aptDispatchWithHelp const * Cmds) /*{{{*/
+static bool ShowHelp(CommandLine &) /*{{{*/
{
std::cout <<
- _("Usage: apt-helper [options] command\n"
- " apt-helper [options] download-file uri target-path\n"
- "\n"
- "apt-helper is a internal helper for apt\n")
- << std::endl;
- ShowHelpListCommands(Cmds);
- std::cout << std::endl <<
- _("This APT helper has Super Meep Powers.") << std::endl;
+ _("Usage: apt-helper [options] command\n"
+ " apt-helper [options] download-file uri target-path\n"
+ "\n"
+ "apt-helper bundles a variety of commands for shell scripts to use\n"
+ "e.g. the same proxy configuration or acquire system as APT would.\n");
return true;
}
/*}}}*/
-std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
+static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
{
return {
{"download-file", &DoDownloadFile, _("download the given uri to the target-path")},
InitLocale();
CommandLine CmdL;
- auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_HELPER, &_config, &_system, argc, argv);
+ auto const Cmds = ParseCommandLine(CmdL, APT_CMD::APT_HELPER, &_config, &_system, argc, argv, &ShowHelp, &GetCommands);
InitOutput();