Module HookScriptAPI
In: setup.rb

This module requires: srcdir_root, objdir_root, relpath

Methods

Public Instance methods

config(key)

Alias for get_config

[Source]

# File setup.rb, line 710
  def curr_objdir
    "#{objdir_root()}/#{relpath()}"
  end

srcdir/objdir (works only in the package directory)

[Source]

# File setup.rb, line 706
  def curr_srcdir
    "#{srcdir_root()}/#{relpath()}"
  end

[Source]

# File setup.rb, line 691
  def get_config(key)
    @config[key]
  end

obsolete: use metaconfig to change configuration

[Source]

# File setup.rb, line 698
  def set_config(key, val)
    @config[key] = val
  end

[Source]

# File setup.rb, line 742
  def srcdirectories(path = '.')
    srcentries(path).select {|fname|
      File.dir?(File.join(curr_srcdir(), path, fname))
    }
  end

[Source]

# File setup.rb, line 722
  def srcdirectory?(path)
    File.dir?(srcfile(path))
  end

[Source]

# File setup.rb, line 730
  def srcentries(path = '.')
    Dir.open("#{curr_srcdir()}/#{path}") {|d|
      return d.to_a - %w(. ..)
    }
  end

[Source]

# File setup.rb, line 718
  def srcexist?(path)
    File.exist?(srcfile(path))
  end

[Source]

# File setup.rb, line 714
  def srcfile(path)
    "#{curr_srcdir()}/#{path}"
  end

[Source]

# File setup.rb, line 726
  def srcfile?(path)
    File.file?(srcfile(path))
  end

[Source]

# File setup.rb, line 736
  def srcfiles(path = '.')
    srcentries(path).select {|fname|
      File.file?(File.join(curr_srcdir(), path, fname))
    }
  end

[Validate]