Permalink
Browse files

setup load path for running scripts against local repo

  fix for #3
1 parent cd6bfcc commit 1d097de9983712c08588ce729397fb458163e4fe @movitto committed Apr 10, 2011
Showing with 13 additions and 2 deletions.
  1. +6 −1 bin/rxsd_test
  2. +7 −1 bin/xsd_to_ruby
View
@@ -6,7 +6,12 @@
# Copyright (C) 2010 Mohammed Morsi <movitto@yahoo.com>
# See COPYING for the License of this software
-require 'rxsd'
+begin
+ require 'rxsd'
+rescue LoadError
+ $: << File.join(File.dirname(File.expand_path(__FILE__)), '..', 'lib')
+ require 'rxsd'
+end
if ARGV.size < 2
puts "missing required arguments"
View
@@ -7,7 +7,13 @@
# See COPYING for the License of this software
require 'fileutils'
-require 'rxsd'
+
+begin
+ require 'rxsd'
+rescue LoadError
+ $: << File.join(File.dirname(File.expand_path(__FILE__)), '..', 'lib')
+ require 'rxsd'
+end
if ARGV.size < 2
puts "missing required arguments"

0 comments on commit 1d097de

Please sign in to comment.