Sha256: 5435d9cb792e6e5bb98118726af3fd1048d306a30d4a415327e86024018fb8ae

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

require 'upm/freshports_search'

UPM::Tool.new "pkg" do

  os "FreeBSD"

  command "install", "pkg install", root: true
  command "update",  "pkg update",  root: true
  command "upgrade", "pkg upgrade", root: true
  command "info",    "pkg clean",   root: true
  command "audit",   "pkg audit",   root: true
  command "verify",  "pkg check --checksums", root: true

  command "files",   "pkg list",    paged: true
  command "search",  "pkg search",  paged: true, highlight: true
  command "search-sources" do |*args|
    query = args.join(" ")
    FreshportsSearch.new.search!(query)
  end

  command "build" do |*args|
    # svn checkout --depth empty svn://svn.freebsd.org/ports/head /usr/ports
    # cd /usr/ports
    # svn update --set-depth files
    # svn update Mk
    # svn update Templates
    # svn update Tools
    # svn update --set-depth files $category
    # cd $category
    # svn update $port
    puts "Not implemented"
  end

  command "info",    "pkg info",    paged: true

  command "list" do |args|
    if args.any?
      query = args.join
      run "pkg", "info", grep: query, highlight: query, paged: true
    else
      run "pkg", "info", paged: true
    end
  end

  command "mirrors" do
    print_files("/etc/pkg/FreeBSD.conf", exclude: /^(#|$)/)
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
upm-0.1.11 lib/upm/tools/pkg.rb
upm-0.1.10 lib/upm/tools/pkg.rb