Sha256: e510d738787807e9086448c36e3ae51350cfbbe02d2658794a6d05f42ee9f6ab

Contents?: true

Size: 625 Bytes

Versions: 4

Compression:

Stored size: 625 Bytes

Contents

UPM::Tool.new "opkg" do

  os "openwrt", "lede"

  command "install", "opkg install",      root: true
  command "update",  "opkg update",       root: true
  command "upgrade", root: true do |args|
    pkgs = `opkg list-upgradable`.each_line.map { |line| line.split.first }
    run "opkg", "upgrade", *pkgs
  end

  command "search" do |args|
    query = args.join
    run "opkg", "list", grep: query, paged: true
  end

  command "list" do |args|
    if args.any?
      query = args.join
      run "opkg", "list-installed", grep: query, paged: true
    else
      run "opkg", "list-installed", paged: true
    end
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
upm-0.1.18 lib/upm/tools/opkg.rb
upm-0.1.17 lib/upm/tools/opkg.rb
upm-0.1.16 lib/upm/tools/opkg.rb
upm-0.1.15 lib/upm/tools/opkg.rb