From 04aa15a8300dd48b950a7a28178abeb96589fdb0 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:52:33 +0000 Subject: Added --version and fixed clogging for -s Author: jgg Date: 1999-01-30 02:12:53 GMT Added --version and fixed clogging for -s --- cmdline/apt-get.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmdline/apt-get.cc') diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 0f9c75ef8..23b9c2237 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.34 1999/01/27 03:42:59 jgg Exp $ +// $Id: apt-get.cc,v 1.35 1999/01/30 02:12:53 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -988,7 +988,9 @@ bool ShowHelp(CommandLine &CmdL) { cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE << " compiled on " << __DATE__ << " " << __TIME__ << endl; - + if (_config->FindB("version") == true) + return 100; + cout << "Usage: apt-get [options] command" << endl; cout << " apt-get [options] install pkg1 [pkg2 ...]" << endl; cout << endl; @@ -1056,6 +1058,7 @@ int main(int argc,const char *argv[]) { CommandLine::Args Args[] = { {'h',"help","help",0}, + {'v',"version","version",0}, {'q',"quiet","quiet",CommandLine::IntLevel}, {'q',"silent","quiet",CommandLine::IntLevel}, {'d',"download-only","APT::Get::Download-Only",0}, @@ -1097,6 +1100,7 @@ int main(int argc,const char *argv[]) // See if the help should be shown if (_config->FindB("help") == true || + _config->FindB("version") == true || CmdL.FileSize() == 0) return ShowHelp(CmdL); -- cgit v1.2.3