Welcome to the "trac"-ing site of soap4r!
[soap4r] [httpclient] [openpgp4u] [pkcs1] [logger] [csv] [vtr]

root/tags/RELEASE_1_4_8/install.rb

Revision 585, 1.3 kB (checked in by nahi, 6 years ago)

Supports installing/uninstalling from other dir.

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