lib/ronin/ui/command_line/commands/install.rb in ronin-0.2.1 vs lib/ronin/ui/command_line/commands/install.rb in ronin-0.2.2

- old
+ new

@@ -41,13 +41,29 @@ opts.options do opts.on('-C','--cache DIR','Specify an alternate overlay cache') do |dir| @cache = dir end - opts.on('-m','--media [MEDIA]','Spedify the media-type of the overlay') do |media| - @media = media + opts.on('-m','--media MEDIA','Spedify the media-type of the overlay') do |media| + @media = media.to_sym end + + opts.on('--rsync','Alias for -m rsync') do + @media = :rsync + end + + opts.on('--svn','Alias for -m svn') do + @media = :svn + end + + opts.on('--hg','Alias for -m hg') do + @media = :hg + end + + opts.on('--git','Alias for -m git') do + @media = :git + end end opts.arguments( 'URI' => 'The URI of the overlay to install' ) @@ -55,10 +71,10 @@ opts.summary %{ Installs the overlay located at the specified URI } end - def arguments(args) + def arguments(*args) unless args.length == 1 fail('only one overlay URI maybe specified') end uri = args.first