]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-helper.cc
apt-helper.cc: include <stdlib.h> for atoi
[apt.git] / cmdline / apt-helper.cc
index be6c2881a70a45626fdddc3e80c62783f7e4e957..5a29427c8859ed1ed3a7141ea7112b621cfef37b 100644 (file)
@@ -29,6 +29,8 @@
 #include <string>
 #include <vector>
 
+#include <stdlib.h>
+
 #include <apti18n.h>
                                                                        /*}}}*/
 
@@ -105,21 +107,18 @@ static bool DoSrvLookup(CommandLine &CmdL)                                /*{{{*/
    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")},
@@ -134,7 +133,7 @@ int main(int argc,const char *argv[])                                       /*{{{*/
    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();