Sha256: 5a647a0e63c4ad2421f974bc844ea05b7d67778733fc4ad1d974d9a3d1c84c02

Contents?: true

Size: 699 Bytes

Versions: 1

Compression:

Stored size: 699 Bytes

Contents

#!/usr/bin/env ruby

require "hiser"
require 'optparse'

ARGV << '-h' if ARGV.empty?  # sets help screen as default
options = {}
OptionParser.new do |opts|
  opts.program_name = 'Hiser'
  opts.on('-g', '--generate PROJECT_PATH', 'Generate a hiser project with the given project path') do | path |
    options[:generate] = true
    options[:project_path] = path
  end
  opts.on('-s', '--serialize', 'Create serialized files from hiera data') { options[:serialize] = true }
  opts.on('-h', '--help', 'Show help') { puts opts; exit }
  opts.version = Hiser::VERSION
  opts.parse!
end

if options[:generate]
  Hiser::Cli.generate(options[:project_path])
elsif options[:serialize]
  Hiser::Cli.start
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
hiser-0.1.0 exe/hiser