This is the mail archive of the
cygwin-apps@cygwin.com
mailing list for the Cygwin project.
-h help option for setup
- From: "Max Bowsher" <maxb at ukf dot net>
- To: <cygwin-apps at cygwin dot com>
- Date: Sat, 1 Feb 2003 00:12:58 -0000
- Subject: -h help option for setup
I propose applying this to setup. It doesn't work (because setup is not a
console application) unless run from a CYGWIN=tty shell, but its better than
nothing, and doesn't break anything else.
Max.
Index: main.cc
===================================================================
RCS file: /home/max/cvsmirror/cygwin-apps-cvs/setup/main.cc,v
retrieving revision 2.23
diff -u -p -r2.23 main.cc
--- main.cc 25 Nov 2002 00:41:25 -0000 2.23
+++ main.cc 19 Jan 2003 13:51:32 -0000
@@ -66,6 +66,7 @@ int next_dialog;
HINSTANCE hinstance;
static BoolOption UnattendedOption (false, 'q', "quiet-mode", "Unattended
setup mode");
+static BoolOption HelpOption (false, 'h', "help", "Display command line
options");
/* Maximum size of a SID on NT/W2K. */
#define MAX_SID_LEN 40
@@ -212,6 +213,8 @@ main (int argc, char **argv)
if (!GetOption::GetInstance().Process (argc,_argv))
theLog->exit(1);
// #endif
+
+ if (HelpOption) { GetOption::GetInstance().ParameterUsage(std::cout);
exit (0); }
unattended_mode = UnattendedOption;