diff options
Diffstat (limited to 'tool/lib/vpath.rb')
-rw-r--r-- | tool/lib/vpath.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tool/lib/vpath.rb b/tool/lib/vpath.rb index a52f840c30..fa819f3242 100644 --- a/tool/lib/vpath.rb +++ b/tool/lib/vpath.rb @@ -53,6 +53,7 @@ class VPath end def def_options(opt) + opt.separator(" VPath common options:") opt.on("-I", "--srcdir=DIR", "add a directory to search path") {|dir| @additional << dir } @@ -80,6 +81,10 @@ class VPath @list end + def add(path) + @additional << path + end + def strip(path) prefix = list.map {|dir| Regexp.quote(dir)} path.sub(/\A#{prefix.join('|')}(?:\/|\z)/, '') |