diff options
author | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:33 +0000 |
---|---|---|
committer | Arch Librarian <arch@canonical.com> | 2004-09-20 16:52:33 +0000 |
commit | 04aa15a8300dd48b950a7a28178abeb96589fdb0 (patch) | |
tree | b0f94c49dc51164512c85f63fc6eef6fdf264441 /cmdline/apt-get.cc | |
parent | 7bf6fd0cf7dc9892a96331b9d936984387de4e53 (diff) |
Added --version and fixed clogging for -s
Author: jgg
Date: 1999-01-30 02:12:53 GMT
Added --version and fixed clogging for -s
Diffstat (limited to 'cmdline/apt-get.cc')
-rw-r--r-- | cmdline/apt-get.cc | 8 |
1 files changed, 6 insertions, 2 deletions
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); |