|
What this is
Other links
The source code
#!/usr/bin/ruby -I../.. -I../../../src
require 'bdbxml'
require 'getoptlong'
opt = GetoptLong.new(
['--container', '-c', GetoptLong::REQUIRED_ARGUMENT],
['--path', '-p', GetoptLong::REQUIRED_ARGUMENT],
['--files', '-f', GetoptLong::REQUIRED_ARGUMENT],
['--home', '-h', GetoptLong::REQUIRED_ARGUMENT]
)
options = {'path' => ''}
opt.each {|name, value| options[name.sub(/^--/, '')] = value}
$files = ARGV.dup
options['path'] << '/' if options['path'].size > 0
if options['files']
IO.foreach(options['files']) {|line| $files << options['path'] + line.chomp}
end
if !$files || !options['container'] || !options['home']
puts <<-EOT
This program loads XML data into an identified container and environment.
Provide the directory where you want to place your database environment,
the name of the container to use, and the xml files you want inserted into
the container.
-h
|
Copyright 1998-2008 Alvin Alexander
All Rights Reserved.
devdaily.com is based in louisville, kentucky, and this web site is hosted by godaddy.com