Sha256: 3aea39ddc088290ab5128a930d9aac7534e6a1d4878f54ba548ece82d0e3b241

Contents?: true

Size: 926 Bytes

Versions: 2

Compression:

Stored size: 926 Bytes

Contents

#!/usr/bin/env ruby

require 'shaddox'
require 'optparse'

@doxfile = './Doxfile'
options = {
	:verbose => true
}

OptionParser.new do |opts|

	opts.banner = "Usage: shaddox [task] [target] [options]"

	opts.on("-v", "--[no]-verbose", "Run verbosely") do |v|
		options[:verbose] = v
	end

	opts.on("--force", "Override lock on target") do |force|
		options[:force] = force
	end

	opts.on("--keep-tmp-dir", "Don't remove the tmpdir after deployment") do |force|
		options[:force] = force
	end

	opts.on("--tmpdir PATH", "Specify the tmp directory to use (default '/tmp/shaddox')") do |dir|
		options[:tmpdir] = dir
	end

	opts.on('-f PATH', '--doxfile', "Specify doxfile") do |f|
		@doxfile = f
	end

	opts.on_tail("-h", "--help", "Show help text") do
		puts opts
		exit
	end

end.parse!

task = ARGV[0]
target = ARGV[1] || 'localhost'

config = Shaddox::Config.new(@doxfile)
config.invoke(task.to_sym, target.to_sym, options)

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shaddox-0.0.8 bin/shaddox
shaddox-0.0.7 bin/shaddox