#!/usr/bin/env ruby ENV["JAZRB_JS_PATH"] = JAZ_DIR = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'jazrb')) INTRO = File.join(JAZ_DIR, "intro.js") OUTRO = File.join(JAZ_DIR, "outro.js") if ARGV.detect { |f| f =~ /\.x?html?$/ } system "envjsrb #{ARGV.join(" ")}" else system "envjsrb #{INTRO} #{ARGV.join(" ")} #{OUTRO}" end