summaryrefslogtreecommitdiff
path: root/cmdline/apt-config.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cmdline/apt-config.cc')
-rw-r--r--cmdline/apt-config.cc20
1 files changed, 4 insertions, 16 deletions
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 40ba468eb..4479b84a7 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -80,11 +80,10 @@ static bool DoDump(CommandLine &CmdL)
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
if (_config->FindB("version") == true)
return true;
-
+
cout <<
_("Usage: apt-config [options] command\n"
"\n"
@@ -115,19 +114,8 @@ int main(int argc,const char *argv[]) /*{{{*/
textdomain(PACKAGE);
// Parse the command line and initialize the package library
- CommandLine CmdL(Args.data(),_config);
- if (pkgInitConfig(*_config) == false ||
- CmdL.Parse(argc,argv) == false ||
- pkgInitSystem(*_config,_system) == false)
- {
- _error->DumpErrors();
- return 100;
- }
-
- // See if the help should be shown
- if (_config->FindB("help") == true ||
- CmdL.FileSize() == 0)
- return ShowHelp(CmdL);
+ CommandLine CmdL;
+ ParseCommandLine(CmdL, Cmds, Args.data(), &_config, &_system, argc, argv, ShowHelp);
std::vector<std::string> const langs = APT::Configuration::getLanguages(true);
_config->Clear("Acquire::Languages");