Sha256: b53a6e0ac9dbe8a4887a4942d1f7dc3c63f58644713ab46d2a61db843980a2c2

Contents?: true

Size: 1.21 KB

Versions: 48

Compression:

Stored size: 1.21 KB

Contents

module Sprinkle
  module Installers
    # = OpenBSD Package Installer
    #
    # The Pkg package installer installs OpenBSD packages.
    # 
    # == Example Usage
    #
    # Installing the magic_beans package.
    #
    #   package :magic_beans do
    #     openbsd_pkg 'magic_beans'
    #   end
    #
    # You may also specify multiple packages as an array:
    #
    #   package :magic_beans do
    #     openbsd_pkg %w(magic_beans magic_sauce)
    #   end
    #
    # == Notes
    # Before OpenBSD packages can be installed, the PKG_PATH
    # environment variable must be set.
    #
    # You must set PKG_PATH in ~/.ssh/environment on the remote
    # system and enable 'PermitUserEnvironment yes' in /etc/ssh/sshd_config
    # 
    # For help on PKG_PATH see section 15.2.2 of the OpenBSD FAQ 
    # (http://www.openbsd.org/faq/faq15.html)
    class OpenbsdPkg < Installer
      attr_accessor :packages #:nodoc:

      def initialize(parent, packages, &block) #:nodoc:
        super parent, &block
        packages = [packages] unless packages.is_a? Array
        @packages = packages
      end

      protected

        def install_commands #:nodoc:
          "pkg_add #{@packages.join(' ')}"
        end

    end
  end
end

Version data entries

48 entries across 48 versions & 10 rubygems

Version Path
crafterm-sprinkle-0.2.1 lib/sprinkle/installers/openbsd_pkg.rb
crafterm-sprinkle-0.2.2 lib/sprinkle/installers/openbsd_pkg.rb
crafterm-sprinkle-0.2.3 lib/sprinkle/installers/openbsd_pkg.rb
crafterm-sprinkle-0.2.4 lib/sprinkle/installers/openbsd_pkg.rb
crafterm-sprinkle-0.2.5 lib/sprinkle/installers/openbsd_pkg.rb
crafterm-sprinkle-0.2.6 lib/sprinkle/installers/openbsd_pkg.rb
jemmyw-sprinkle-0.2.3 lib/sprinkle/installers/openbsd_pkg.rb
jemmyw-sprinkle-0.2.4 lib/sprinkle/installers/openbsd_pkg.rb
justsee-sprinkle-0.2.4 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.1 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.10 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.11 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.13 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.14 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.15 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.16 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.2 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.3 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.4 lib/sprinkle/installers/openbsd_pkg.rb
lachlan-sprinkle-0.0.5 lib/sprinkle/installers/openbsd_pkg.rb