# File lib/autumn/tool/bin.rb, line 172 def al_root require "pathname" dir = nil if ARGV.size == 1 dir = Pathname.new(ARGV.shift) elsif ARGV.size > 1 $stderr.puts "Unknown options given #{ARGV.join(" ")}" puts usage exit 1 end if dir.nil? or not dir.directory? dir = Pathname.new(ENV["PWD"]).expand_path $stderr.puts "Path to autumn tree not given or invalid, using #{dir}" end Object.const_set("AL_ROOT", dir.expand_path.to_s) Dir.chdir(AL_ROOT) end