Skip to content
Browse files

Created bin/akin

  • Loading branch information...
1 parent eb0bb7a commit 31bbcd3dbcbed5b12359e629e3dace077add9c10 @vic committed Sep 21, 2011
Showing with 76 additions and 0 deletions.
  1. +5 −0 bin/akin
  2. +38 −0 lib/akin/command.rb
  3. +9 −0 lib/akin/message.rb
  4. +21 −0 lib/akin/version.rb
  5. +3 −0 lib/akin/version/git.rb
View
5 bin/akin
@@ -0,0 +1,5 @@
+#!/usr/bin/env ruby
+
+require File.expand_path '../../lib/akin', __FILE__
+require File.expand_path '../../lib/akin/command', __FILE__
+Akin::Command.run(ARGV)
View
38 lib/akin/command.rb
@@ -0,0 +1,38 @@
+require 'ostruct'
+require 'optparse'
+
+module Akin
+ module Command
+
+ COMPILE_TARGETS = %w[rbx sexp]
+
+ extend self
+
+ def run(argv)
+ opts = options(argv)
+ end
+
+ def options(argv)
+ opts = OpenStruct.new
+ parser = OptionParser.new do |parser|
+ parser.separator ""
+ parser.separator "OPTIONS"
+
+ parser.on("-c", "--compile [TARGET]", COMPILE_TARGETS,
+ "Just compile sources.",
+ "TARGET can be one of: #{COMPILE_TARGETS.join(', ')}",
+ "Default: #{COMPILE_TARGETS.first}") do |target|
+ opts.target = target || COMPILE_TARGETS.first
+ end
+
+ parser.on("-h", "--help") do
+ puts parser
+ exit 0
+ end
+ end
+ opts.argv = parser.parse(argv)
+ opts
+ end
+
+ end
+end
View
9 lib/akin/message.rb
@@ -0,0 +1,9 @@
+module Akin
+ class Message
+
+ def initialize(type, args, bwd, fwd, up)
+
+ end
+
+ end
+end
View
21 lib/akin/version.rb
@@ -0,0 +1,21 @@
+module Akin
+ module Version
+
+ @codename = "Atl"
+
+ @version = {
+ :major => 0,
+ :minor => 0,
+ :micro => 0
+ }
+
+ @git = {
+ :commit => nil,
+ :date => nil,
+ :subject => nil,
+ :author => nil,
+ :email => nil
+ }
+
+ end
+end
View
3 lib/akin/version/git.rb
@@ -0,0 +1,3 @@
+module Akin::Version
+ @git = {}
+end

0 comments on commit 31bbcd3

Please sign in to comment.
Something went wrong with that request. Please try again.