avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r900582 - /hadoop/avro/trunk/build.sh
Date Mon, 18 Jan 2010 21:42:45 GMT
Author: cutting
Date: Mon Jan 18 21:42:45 2010
New Revision: 900582

URL: http://svn.apache.org/viewvc?rev=900582&view=rev
Log:
AVRO-339.  Fix build.sh to show usage if invoked without arguments.  Contributed by philz.

Modified:
    hadoop/avro/trunk/build.sh

Modified: hadoop/avro/trunk/build.sh
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/build.sh?rev=900582&r1=900581&r2=900582&view=diff
==============================================================================
--- hadoop/avro/trunk/build.sh (original)
+++ hadoop/avro/trunk/build.sh Mon Jan 18 21:42:45 2010
@@ -21,6 +21,16 @@
 
 VERSION=`cat share/VERSION.txt`
 
+function usage {
+  echo "Usage: $0 {test|dist|clean}"
+  exit 1
+}
+
+if [ $# -eq 0 ]
+then
+  usage
+fi
+
 set -x						  # echo commands
 
 for target in "$@"
@@ -91,8 +101,8 @@
 	;;
 
     *)
-        echo "Usage: $0 {test|dist|clean}"
-        exit 1
+        usage
+        ;;
 esac
 
 done



Mime
View raw message