Module: Spock::CLI

Extended by:
Trollop
Defined in:
lib/spock/cli.rb

Class Method Summary collapse

Class Method Details

.run(args = ARGV) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/spock/cli.rb', line 9

def run(args = ARGV)
  opts = options args do
    banner <<EOS
Usage: spock [CONFIG]
Merge multiple directories into one using symlinks.

If CONFIG is not given, try ~/.spockrc, ~/Dropbox/.spockrc, ~/Dropbox/Apps/Spock/spockrc, in that order.
 
EOS
    opt :dry_run, "Don't actually merge anything; just print",
      :short => '-n'
    version Spock::VERSION
  end
  
  spock = Spock.new ARGV[0], opts
  spock.merge
end