diff options
Diffstat (limited to 'new/bin')
l--------- | new/bin/.#server.rb | 1 | ||||
-rw-r--r-- | new/bin/builder.rb | 35 |
2 files changed, 35 insertions, 1 deletions
diff --git a/new/bin/.#server.rb b/new/bin/.#server.rb deleted file mode 120000 index e9c1dc67..00000000 --- a/new/bin/.#server.rb +++ /dev/null @@ -1 +0,0 @@ -mms@voyager.local.45942:1734682989
\ No newline at end of file diff --git a/new/bin/builder.rb b/new/bin/builder.rb new file mode 100644 index 00000000..47195b27 --- /dev/null +++ b/new/bin/builder.rb @@ -0,0 +1,35 @@ +require 'optparse' + +require_relative "../lib/crys" +require_relative "mixins/splash.rb" + +Options = Struct.new(:filepath) +@options = Options.new + +OptionParser.new do |opts| + opts.banner = 'Usage: builder.rb [options]' + + opts.on('-fPATH', '--file=PATH', 'File path') do |n| + @options[:filepath] = n + end +end.parse! + + +module Crys + class BuilderRunner + + def initialize(file_path:, image_dir:, output_dir:, builder_class:) + @file_path = file_path + @output_dir = output_dir + @builder_class = builder_class + @image_dir = image_dir + end + + def run + builder_class.new(file_path: file_path, output_dir: output_dir, image_dir: image_dir).build + end + + private + attr_reader :builder_class, :file_path, :output_dir, :image_dir + end +end |