Sha256: b3033eb9cdcf7b111833f9444dc3c070f0ddc68493373bbeb52da294faa43a15

Contents?: true

Size: 435 Bytes

Versions: 1

Compression:

Stored size: 435 Bytes

Contents

#!/usr/bin/env ruby

# look for /XXX/lib and map XXX => gem root
aloxes = ($:.collect {|lib| lib.match(%r{(.*?/([^/]+))/lib}) }).compact.inject({}) {|acc, m| acc[m[2]] =  m[1]; acc }

ENV['PATH'] = aloxes.inject(ENV['PATH']) {|acc, alox|
  _, root = alox

  if File.directory? "#{root}/aloxec"
    acc="#{root}/aloxec:#{acc}"
  end

  if File.directory? "#{root}/exec"
    acc="#{root}/exec:#{acc}"
  end

  acc
}

exec("_sub", *ARGV)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
alox-0.0.9 bin/alox