File: import.rb

package info (click to toggle)
ruby-snmp 1.3.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,860 kB
  • sloc: ruby: 1,791; makefile: 9
file content (22 lines) | stat: -rw-r--r-- 519 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# use local implementation, not the installed gem (if any)
$LOAD_PATH.unshift(File.dirname(__FILE__) + "/lib")

require 'snmp/mib'

if ARGV.size == 1
  mib_path = ARGV[0]
else
  smilint_version = `smilint --version`
  libsmi_version = smilint_version.split[1]
  mib_path = "/usr/local/Cellar/libsmi/#{libsmi_version}/share/mibs/ietf"
end

Dir["#{mib_path}/*"].each do |file|
  print file
  if (File.basename(file) == 'DOT12-RPTR-MIB')
    puts " (skipping)"
  else
    puts
    SNMP::MIB::import_module(file)
  end
end