1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
#!/usr/bin/env ruby
require 'rbconfig'
require 'ftools'
include Config
RV = CONFIG["MAJOR"] + "." + CONFIG["MINOR"]
DSTPATH = CONFIG["sitedir"] + "/" + RV
SRCPATH = File.dirname( $0 )
def join( *arg )
File.join( *arg )
end
require join( SRCPATH, '_installedFiles' )
$installed = InstalledFiles.new( SRCPATH )
def install( from, to )
toPath = File.catname( from, to )
unless FileTest.exist?( toPath ) and File.compare( from, toPath )
File.install( from, toPath, 0644, true )
$installed << InstalledFile.new( toPath )
end
end
def installDir( from, to )
unless FileTest.directory?( from )
raise RuntimeError.new( "'#{ from }' not found." )
end
File.mkpath( to, true )
Dir[ join( from, '*.rb' ) ].each do | name |
install( name, to )
end
end
begin
installDir( join( SRCPATH, 'lib', 'soap' ), join( DSTPATH, 'soap' ))
installDir( join( SRCPATH, 'lib', 'wsdl' ), join( DSTPATH, 'wsdl' ))
installDir( join( SRCPATH, 'lib', 'wsdl', 'xmlSchema' ),
join( DSTPATH, 'wsdl', 'xmlSchema' ))
installDir( join( SRCPATH, 'lib', 'wsdl', 'soap' ),
join( DSTPATH, 'wsdl', 'soap' ))
installDir( join( SRCPATH, "redist" ), DSTPATH )
installDir( join( SRCPATH, 'redist', 'soap' ), join( DSTPATH, 'soap' ))
$installed.dump( SRCPATH )
puts "install succeed!"
rescue
puts "install failed!"
puts $!
end
|