Sha256: bdb179af8c2f399780abd79200ddb1e655d83df57169b2bf5f68edf6f70e6b02
Contents?: true
Size: 613 Bytes
Versions: 9
Compression:
Stored size: 613 Bytes
Contents
module Autobuild ## Adds an element to a path-like variable def self.pathvar(path, varname) if File.directory?(path) oldpath = ENV[varname] if oldpath.nil? || oldpath.empty? ENV[varname] = path else ENV[varname] = "#{path}:#{oldpath}" end end end ## Updates the environment when a new prefix has been added # TODO: modularize that def self.update_environment(newprefix) pathvar("#{newprefix}/bin", 'PATH') pathvar("#{newprefix}/lib/pkgconfig", 'PKG_CONFIG_PATH') end end
Version data entries
9 entries across 9 versions & 1 rubygems