[orca] add a help flag to runone.sh
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] add a help flag to runone.sh
- Date: Fri, 31 Dec 2010 19:26:09 +0000 (UTC)
commit 855ddfb322f9f619c3be21f3ca4a26f4c4241c9f
Author: Trevor Saunders <trev saunders gmail com>
Date: Fri Dec 31 13:50:31 2010 -0500
add a help flag to runone.sh
if runone.sh is invoked with no arguments or with -h, -? or --help it
will provide usage information.
https://bugzilla.gnome.org/show_bug.cgi?id=638420
test/harness/runone.sh | 30 ++++++++++++++++++------------
1 files changed, 18 insertions(+), 12 deletions(-)
---
diff --git a/test/harness/runone.sh b/test/harness/runone.sh
index 1a9ead9..7cab51b 100755
--- a/test/harness/runone.sh
+++ b/test/harness/runone.sh
@@ -1,16 +1,17 @@
#!/bin/bash
-#
-# See http://live.gnome.org/Orca/RegressionTesting for more info.
-#
-# runone.sh takes the following parameters:
-#
-# keystroke_file.py [application_name] [0|1]
-#
-# where:
-#
-# application_name is the name of the application to run
-# 0 = start and stop orca inside this shell script
-# 1 = assume orca is already running
+
+useage()
+{
+ echo './runone.sh keystroke_file.py [application_name] [0|1]'
+echo 'application_name is the name of the application to run'
+echo '0 = start and stop orca inside this shell script'
+echo '1 = assume orca is already running'
+echo " " # for a blank line
+ echo 'See http://live.gnome.org/Orca/RegressionTesting for more info.'
+
+exit 1
+}
+
#
# Set up our accessibility environment for those apps that
# don't do it on their own.
@@ -28,6 +29,11 @@ export PATH=$harnessDir/bin:$PATH
export LANG=C
export LC_ALL=C
+if [ "$1" = "-h" -o "$1" = "-?" -o "$1" = "--help" -o $# -eq 0 ]
+then
+ useage
+fi
+
#echo runone.sh: $*
debugFile=`basename $1 .py`
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]