#!/usr/bin/env ruby # # A simple example of executable main file. This script is NOT required to be ruby. # # # inputdir is the first argument your main script will get. It will ALWAYS get this. inputdir # will ALWAYS be a directory that contains (ripd/, rawd/, fixd/, env/, and log/). # inputdir = ARGV[0] # # outputdir is the second argument your main script will get. It will ALWAYS get this. outputdir # will ALWAYS be the fixd/data/ directory # outputdir = ARGV[1] # # Ruby example: read in the working_config.json file in env/ into a ruby hash # (same as a javascript associative array, a java hashmap, a python dictionary, etc) # called 'options' to access the configuration settings used to execute the Rakefile # require 'rubygems' require 'json' options = JSON.parse(File.read(File.join(inputdir, "env", "working_config.json"))) # # If you require 'hackboxen' you can access the default paths utility method # require 'hackboxen' path_to :fixd_dir # => "[current_dataroot]/fixd/" path_to :hb_engine # => "[current_hackbox]/engine/"