#!/usr/bin/env ruby

require 'shellwords'

if ARGV.empty? or not Dir.exists? ARGV[0]
  ARGV.unshift Dir.pwd
end

cmd = "bugspots #{Shellwords.escape(ARGV[0])} #{ARGV[1..-1].join(' ')}"
exec cmd
