blob: c2130c41ed167bc7a1995eb7109bcfc169c69e61 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
$NetBSD: patch-aa,v 1.3 2010/09/10 04:56:04 taca Exp $
Add support for DESTDIR.
--- install.rb.orig 2008-10-22 15:53:45.000000000 +0000
+++ install.rb
@@ -1,10 +1,15 @@
require 'rbconfig'
+require 'fileutils'
sitelibdir = Config::CONFIG.fetch("sitelibdir")
bindir = Config::CONFIG.fetch("bindir")
def copy(src, dest, mode)
+ if (destdir = ENV['DESTDIR'])
+ dest = File.join(destdir, dest)
+ end
p dest
+ FileUtils::mkdir_p(File.dirname(dest))
open(src, "rb") do |infile|
open(dest, "wb") do |outfile|
while buf = infile.read(8192)
|