Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

setup load path for running scripts against local repo

  fix for movitto#3
  • Loading branch information...
commit 1d097de9983712c08588ce729397fb458163e4fe 1 parent cd6bfcc
Mo Morsi movitto authored
Showing with 13 additions and 2 deletions.
  1. +6 −1 bin/rxsd_test
  2. +7 −1 bin/xsd_to_ruby
7 bin/rxsd_test
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"
8 bin/xsd_to_ruby
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"
Please sign in to comment.
Something went wrong with that request. Please try again.