Support invoking arv-get and arv-put via "arv get" and "arv put".
authorTom Clegg <tom@clinicalfuture.com>
Tue, 10 Dec 2013 19:38:41 +0000 (11:38 -0800)
committerTom Clegg <tom@clinicalfuture.com>
Tue, 10 Dec 2013 19:38:41 +0000 (11:38 -0800)
refs #1646

sdk/cli/bin/arv

index 0abd976fc54363e008a6dfdad20dbdfe60918586..511359e81a78ae92de3fd1ce49aaea8f7c215ae4 100755 (executable)
@@ -10,7 +10,12 @@ if RUBY_VERSION < '1.9.3' then
   EOS
 end
 
-if ARGV[0] == 'keep'
+case ARGV[0]
+when 'get', 'put'
+  cmd = 'arv-' + ARGV.shift
+  exec `which #{cmd}`.strip, *ARGV
+  abort
+when 'keep'
   ARGV.shift
   @sub = ARGV.shift
   if ['ls', 'get', 'put', 'less', 'check'].index @sub then
@@ -24,9 +29,7 @@ if ARGV[0] == 'keep'
       "#{$0} keep check\n"
   end
   abort
-end
-
-if ARGV[0] == 'pipeline'
+when 'pipeline'
   ARGV.shift
   @sub = ARGV.shift
   if ['run'].index @sub then