#!/usr/pkg/bin/ruby200

require File.dirname(__FILE__) + '/../lib/staticmatic'

command = ARGV[0]
directory = ARGV[1]

if !command || !directory
  puts "Usage: #{$0} <build|setup|preview> <directory>"
  exit
end

$:.push File.join(directory, "lib")

staticmatic = StaticMatic::Base.new(directory)
staticmatic.run(command)
