| 1 |
#!/usr/bin/env ruby |
|---|
| 2 |
# |
|---|
| 3 |
# Installer for SOAP4R |
|---|
| 4 |
# Copyright (C) 2001 Michael Neumann. |
|---|
| 5 |
# |
|---|
| 6 |
# From: Michael Neumann <neumann@s-direktnet.de> |
|---|
| 7 |
# Message-ID: <20010703221736.A20714@michael.neumann.all> |
|---|
| 8 |
# Date: Tue, 3 Jul 2001 22:17:36 +0200 |
|---|
| 9 |
|
|---|
| 10 |
require "rbconfig" |
|---|
| 11 |
require "ftools" |
|---|
| 12 |
include Config |
|---|
| 13 |
|
|---|
| 14 |
RV = CONFIG["MAJOR"] + "." + CONFIG["MINOR"] |
|---|
| 15 |
DSTPATH = CONFIG["sitedir"] + "/" + RV |
|---|
| 16 |
|
|---|
| 17 |
begin |
|---|
| 18 |
unless FileTest.directory?( "lib/soap" ) |
|---|
| 19 |
raise RuntimeError.new( "'lib/soap' not found." ) |
|---|
| 20 |
end |
|---|
| 21 |
|
|---|
| 22 |
unless FileTest.directory?( "redist" ) |
|---|
| 23 |
raise RuntimeError.new( "'redist' not found." ) |
|---|
| 24 |
end |
|---|
| 25 |
|
|---|
| 26 |
unless FileTest.directory?( "redist/soap" ) |
|---|
| 27 |
raise RuntimeError.new( "'redist/soap' not found." ) |
|---|
| 28 |
end |
|---|
| 29 |
|
|---|
| 30 |
File.mkpath DSTPATH + "/soap", true |
|---|
| 31 |
Dir["lib/soap/*.rb"].each do |name| |
|---|
| 32 |
File.install name, "#{DSTPATH}/soap/#{File.basename name}", 0644, true |
|---|
| 33 |
end |
|---|
| 34 |
|
|---|
| 35 |
Dir["redist/soap/*.rb"].each do |name| |
|---|
| 36 |
File.install name, "#{DSTPATH}/soap/#{File.basename name}", 0644, true |
|---|
| 37 |
end |
|---|
| 38 |
|
|---|
| 39 |
Dir["redist/*.rb"].each do |name| |
|---|
| 40 |
File.install name, "#{DSTPATH}/#{File.basename name}", 0644, true |
|---|
| 41 |
end |
|---|
| 42 |
|
|---|
| 43 |
# Installing URb |
|---|
| 44 |
File.mkpath DSTPATH + "/uri", true |
|---|
| 45 |
Dir["redist/uri/*.rb"].each do |name| |
|---|
| 46 |
File.install name, "#{DSTPATH}/uri/#{File.basename name}", 0644, true |
|---|
| 47 |
end |
|---|
| 48 |
|
|---|
| 49 |
# Installing http-access2 |
|---|
| 50 |
File.mkpath DSTPATH + "/http-access2", true |
|---|
| 51 |
Dir["redist/http-access2/*.rb"].each do |name| |
|---|
| 52 |
File.install name, "#{DSTPATH}/http-access2/#{File.basename name}", 0644, true |
|---|
| 53 |
end |
|---|
| 54 |
|
|---|
| 55 |
rescue |
|---|
| 56 |
puts "install failed!" |
|---|
| 57 |
puts $! |
|---|
| 58 |
else |
|---|
| 59 |
puts "install succeed!" |
|---|
| 60 |
end |
|---|