Author: andy
Date: Fri Jun 28 09:40:27 2013
New Revision: 1497702

URL: http://svn.apache.org/r1497702
Log:
Fix use of plain 'soh' with no sub-command

Modified:
    jena/trunk/jena-fuseki/soh

Modified: jena/trunk/jena-fuseki/soh
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-fuseki/soh?rev=1497702&r1=1497701&r2=1497702&view=diff
==============================================================================
--- jena/trunk/jena-fuseki/soh (original)
+++ jena/trunk/jena-fuseki/soh Fri Jun 28 09:40:27 2013
@@ -111,11 +111,15 @@ $accept_charset=nil
 
 $cmd = File.basename($0)
 if ! $cmd.start_with?('s-')
-# If you don't have start_with? ...
-# if ! $cmd.match(/^s-/)
+  # If you don't have start_with? ...
+  # if ! $cmd.match(/^s-/)
   # "soh query ..."
-  $cmd = ARGV.shift
-  $cmd = 's-'+$cmd
+  if ARGV.size == 0
+    $cmd = 'soh'
+  else
+    $cmd = ARGV.shift
+    $cmd = 's-'+$cmd
+  end
 end
 
 ## -------- 
@@ -360,7 +364,7 @@ def cmd_soh(command=nil)
 
   if command.nil?
     if ARGV.size == 0
-      warn "No command given: expected one of get, put, post, delete"
+      warn "No command given: expected one of 'get', 'put', 'post', 'delete', 
'query' or 'update'"
       exit 1
     end
     cmdPrint=ARGV.shift


Reply via email to