Sha256: 86fa2021d932ba40d63467691729f8d9a82f81cb4048cd99c2d3bec00559d9f8

Contents?: true

Size: 577 Bytes

Versions: 36

Compression:

Stored size: 577 Bytes

Contents

class Specinfra::Command::Openbsd::Base::Package < Specinfra::Command::Base::Package
  class << self
    def check_is_installed(package, version=nil)
      if version
        "pkg_info -a | cut -d ' ' -f 1 | grep  #{escape(package)}-#{escape(version)}"
      else
        "pkg_info -a | cut -d ' ' -f 1 | grep  #{escape(package)}"
      end
    end

    def install(package, version=nil, option='')
      "pkg_add #{option} #{package}"
    end

    def get_version(package, _opts=nil)
      "pkg_info -I #{package} | sed -e 's/#{package}-//' | cut -d' ' -f1"
    end
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.90.1 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.90.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.89.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.88.2 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.88.1 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.88.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.87.2 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.87.1 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.87.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.86.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.85.1 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.85.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.84.1 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.84.0 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.83.4 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.83.3 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.83.2 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.83.1 lib/specinfra/command/openbsd/base/package.rb
specinfra-2.83.0 lib/specinfra/command/openbsd/base/package.rb