#!/bin/sh
exec ruby -w -x $0 ${1+"$@"} # -*- ruby -*-
#!ruby -w
# vim: set filetype=ruby : set sw=2

dir = File.dirname(File.dirname(File.expand_path(__FILE__)))

libpath = dir + "/share"
$:.unshift libpath

require 'svndelta/svndelta'

begin
  SVN::Delta::Executor.new
rescue Interrupt, REXML::ParseException => e
  # REXML wraps all exceptions in a ParseException, so we can't just
  # look for Interrupts
  exit(-1)
rescue SystemExit => e
  exit(e.status)
rescue Exception => e
  # show only the message, not the stack trace:
  $stderr.puts "error: #{e}"
  # puts e.backtrace
end
