- CommandLine::Dispatch Cmds[] = {{"update",&DoUpdate},
- {"upgrade",&DoUpgrade},
- {"install",&DoInstall},
- {"remove",&DoInstall},
- {"purge",&DoInstall},
- {"autoremove",&DoInstall},
- {"markauto",&DoMarkAuto},
- {"unmarkauto",&DoMarkAuto},
- {"dist-upgrade",&DoDistUpgrade},
- {"dselect-upgrade",&DoDSelectUpgrade},
- {"build-dep",&DoBuildDep},
- {"clean",&DoClean},
- {"autoclean",&DoAutoClean},
- {"check",&DoCheck},
- {"source",&DoSource},
- {"download",&DoDownload},
- {"changelog",&DoChangelog},
- {"moo",&DoMoo},
- {"help",&ShowHelp},
- {0,0}};
-
- std::vector<CommandLine::Args> Args = getCommandArgs("apt-get", CommandLine::GetCommand(Cmds, argc, argv));
-
- // Set up gettext support
- setlocale(LC_ALL,"");
- textdomain(PACKAGE);
+ InitLocale();
+
+ CommandLine::DispatchWithHelp Cmds[] = {
+ {"update", &DoUpdate, _("Retrieve new lists of packages")},
+ {"upgrade", &DoUpgrade, _("Perform an upgrade")},
+ {"install", &DoInstall, _("Install new packages (pkg is libc6 not libc6.deb)")},
+ {"remove", &DoInstall, _("Remove packages")},
+ {"purge", &DoInstall, _("Remove packages and config files")},
+ {"autoremove", &DoInstall, _("Remove automatically all unused packages")},
+ {"auto-remove", &DoInstall, nullptr},
+ {"markauto", &DoMarkAuto, nullptr},
+ {"unmarkauto", &DoMarkAuto, nullptr},
+ {"dist-upgrade", &DoDistUpgrade, _("Distribution upgrade, see apt-get(8)")},
+ {"full-upgrade", &DoDistUpgrade, nullptr},
+ {"dselect-upgrade", &DoDSelectUpgrade, _("Follow dselect selections")},
+ {"build-dep", &DoBuildDep, _("Configure build-dependencies for source packages")},
+ {"clean", &DoClean, _("Erase downloaded archive files")},
+ {"autoclean", &DoAutoClean, _("Erase old downloaded archive files")},
+ {"auto-clean", &DoAutoClean, nullptr},
+ {"check", &DoCheck, _("Verify that there are no broken dependencies")},
+ {"source", &DoSource, _("Download source archives")},
+ {"download", &DoDownload, _("Download the binary package into the current directory")},
+ {"changelog", &DoChangelog, _("Download and display the changelog for the given package")},
+ {"indextargets", &DoIndexTargets, nullptr},
+ {"moo", &DoMoo, nullptr},
+ {nullptr, nullptr, nullptr}
+ };