summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:52:33 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:52:33 +0000
commit04aa15a8300dd48b950a7a28178abeb96589fdb0 (patch)
treeb0f94c49dc51164512c85f63fc6eef6fdf264441 /cmdline
parent7bf6fd0cf7dc9892a96331b9d936984387de4e53 (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')
-rw-r--r--cmdline/apt-cache.cc5
-rw-r--r--cmdline/apt-cdrom.cc5
-rw-r--r--cmdline/apt-config.cc5
-rw-r--r--cmdline/apt-get.cc8
4 files changed, 18 insertions, 5 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index 8f6a40e27..cf1240bc6 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.22 1999/01/27 02:48:53 jgg Exp $
+// $Id: apt-cache.cc,v 1.23 1999/01/30 02:12:53 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
@@ -447,6 +447,8 @@ bool ShowHelp(CommandLine &Cmd)
{
cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
" compiled on " << __DATE__ << " " << __TIME__ << endl;
+ if (_config->FindB("version") == true)
+ return 100;
cout << "Usage: apt-cache [options] command" << endl;
cout << " apt-cache [options] add file1 [file1 ...]" << endl;
@@ -492,6 +494,7 @@ int main(int argc,const char *argv[])
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
+ {'v',"version","version",0},
{'p',"pkg-cache","Dir::Cache::pkgcache",CommandLine::HasArg},
{'s',"src-cache","Dir::Cache::srcpkgcache",CommandLine::HasArg},
{'q',"quiet","quiet",CommandLine::IntLevel},
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 85afa10f8..85d2fa3e8 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cdrom.cc,v 1.16 1999/01/27 02:48:53 jgg Exp $
+// $Id: apt-cdrom.cc,v 1.17 1999/01/30 02:12:53 jgg Exp $
/* ######################################################################
APT CDROM - Tool for handling APT's CDROM database.
@@ -966,6 +966,8 @@ int ShowHelp()
{
cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
" compiled on " << __DATE__ << " " << __TIME__ << endl;
+ if (_config->FindB("version") == true)
+ return 100;
cout << "Usage: apt-cdrom [options] command" << endl;
cout << endl;
@@ -994,6 +996,7 @@ int main(int argc,const char *argv[])
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
+ {'v',"version","version",0},
{'d',"cdrom","Acquire::cdrom::mount",CommandLine::HasArg},
{'r',"rename","APT::CDROM::Rename",0},
{'m',"no-mount","APT::CDROM::NoMount",0},
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index 81d49e5f3..b1b134d97 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-config.cc,v 1.2 1998/11/27 01:52:57 jgg Exp $
+// $Id: apt-config.cc,v 1.3 1999/01/30 02:12:53 jgg Exp $
/* ######################################################################
APT Config - Program to manipulate APT configuration files
@@ -47,6 +47,8 @@ int ShowHelp()
{
cout << PACKAGE << ' ' << VERSION << " for " << ARCHITECTURE <<
" compiled on " << __DATE__ << " " << __TIME__ << endl;
+ if (_config->FindB("version") == true)
+ return 100;
cout << "Usage: apt-config [options] command" << endl;
cout << endl;
@@ -67,6 +69,7 @@ int main(int argc,const char *argv[])
{
CommandLine::Args Args[] = {
{'h',"help","help",0},
+ {'v',"version","version",0},
{'c',"config-file",0,CommandLine::ConfigFile},
{'o',"option",0,CommandLine::ArbItem},
{0,0,0,0}};
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);