2009-04-03 16:27:49 +00:00
|
|
|
#!/usr/bin/ruby
|
|
|
|
|
|
|
|
require 'config'
|
2009-05-22 21:01:23 +00:00
|
|
|
require 'map'
|
|
|
|
|
|
|
|
module SshfsMapper
|
|
|
|
class SshfsMapper
|
|
|
|
def initialize()
|
|
|
|
@maps = nil
|
|
|
|
puts "-- sshfs-mapper --"
|
|
|
|
conf = Config.new
|
|
|
|
conf.parseCmd ARGV
|
|
|
|
@maps = conf.parseFile
|
|
|
|
puts conf
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
def run()
|
|
|
|
if @maps.nil? then
|
|
|
|
return
|
|
|
|
end
|
|
|
|
@maps.each do |map_path|
|
|
|
|
map = Map.new( map_path )
|
2009-06-12 15:49:30 +00:00
|
|
|
map.parse()
|
2009-05-22 21:01:23 +00:00
|
|
|
end
|
|
|
|
puts "--run"
|
|
|
|
end
|
2009-04-03 16:27:49 +00:00
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2009-05-22 21:01:23 +00:00
|
|
|
app = SshfsMapper::SshfsMapper.new
|
|
|
|
app.run
|
2009-04-03 16:27:49 +00:00
|
|
|
|