From 1ddff05d5fbc9494c674799927d544fce72b1239 Mon Sep 17 00:00:00 2001
From: jvergara <jvergara@localhost>
Date: Thu, 05 Jul 2007 12:11:15 +0000
Subject: [PATCH] According to the usage of the graphical install and uninstall commands, the additional options are ignored if we do not specify the --cli option.  However currently if the user does not specify --cli and adds one of the other options, the usage is displayed.  With these modifications, usage is only displayed when user asks for it or when the user provides invalid options in CLI mode (which is more consistent with what is specified in the usage).

---
 opends/src/quicksetup/org/opends/quicksetup/Launcher.java |   14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
index 6727a5a..589ac57 100644
--- a/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
+++ b/opends/src/quicksetup/org/opends/quicksetup/Launcher.java
@@ -68,15 +68,11 @@
    */
   protected boolean shouldPrintUsage() {
     boolean printUsage = false;
-    if (!isCli() && args.length > 0) {
-      printUsage = true;
-    } else {
-      if ((args != null) && (args.length > 0)) {
-        for (String arg : args) {
-          if (arg.equalsIgnoreCase("-H") ||
-                  arg.equalsIgnoreCase("--help")) {
-            printUsage = true;
-          }
+    if ((args != null) && (args.length > 0)) {
+      for (String arg : args) {
+        if (arg.equalsIgnoreCase("-H") ||
+          arg.equalsIgnoreCase("--help")) {
+          printUsage = true;
         }
       }
     }

--
Gitblit v1.10.0