[前][次][番号順一覧][スレッド一覧]

ruby-changes:3950

From: ko1@a...
Date: Tue, 12 Feb 2008 12:16:22 +0900 (JST)
Subject: [ruby-changes:3950] matz - Ruby:r15440 (trunk): * instruby.rb: specify file mode to install. a patch from

matz	2008-02-12 12:16:07 +0900 (Tue, 12 Feb 2008)

  New Revision: 15440

  Modified files:
    trunk/ChangeLog
    trunk/instruby.rb

  Log:
    * instruby.rb: specify file mode to install.  a patch from
      pegacorn  <subscriber.jp AT gmail.com> in [ruby-dev:33699].

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15440&r2=15439&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/instruby.rb?r1=15440&r2=15439&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15439)
+++ ChangeLog	(revision 15440)
@@ -1,3 +1,8 @@
+Tue Feb 12 12:13:25 2008  Yukihiro Matsumoto  <matz@r...>
+
+	* instruby.rb: specify file mode to install.  a patch from
+	  pegacorn  <subscriber.jp AT gmail.com> in [ruby-dev:33699].
+
 Tue Feb 12 11:38:57 2008  Yukihiro Matsumoto  <matz@r...>
 
 	* numeric.c (rb_num_coerce_bin): add ID argument to specify
Index: instruby.rb
===================================================================
--- instruby.rb	(revision 15439)
+++ instruby.rb	(revision 15440)
@@ -123,8 +123,9 @@
 end
 
 def install_recursive(srcdir, dest, options = {})
-  noinst = options[:no_install]
-  glob = options[:glob] || "*"
+  opts = options.clone
+  noinst = opts.delete(:no_install)
+  glob = opts.delete(:glob) || "*"
   subpath = srcdir.size..-1
   Dir.glob("#{srcdir}/**/#{glob}") do |src|
     case base = File.basename(src)
@@ -143,7 +144,7 @@
       makedirs(d)
     else
       makedirs(File.dirname(d))
-      install src, d
+      install src, d, opts
     end
   end
 end
@@ -224,15 +225,15 @@
     if noinst = CONFIG["no_install_files"] and noinst.empty?
       noinst = nil
     end
-    install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst)
-    install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h")
+    install_recursive("#{extout}/#{CONFIG['arch']}", archlibdir, :no_install => noinst, :mode => 0755)
+    install_recursive("#{extout}/include/#{CONFIG['arch']}", archhdrdir, :glob => "*.h", :mode => 0644)
   end
   install?(:ext, :comm, :'ext-comm') do
     puts "installing extension scripts"
     hdrdir = rubyhdrdir + "/ruby"
     makedirs [rubylibdir, sitelibdir, vendorlibdir, hdrdir]
-    install_recursive("#{extout}/common", rubylibdir)
-    install_recursive("#{extout}/include/ruby", hdrdir, :glob => "*.h")
+    install_recursive("#{extout}/common", rubylibdir, :mode => 0644)
+    install_recursive("#{extout}/include/ruby", hdrdir, :glob => "*.h", :mode => 0644)
   end
 end
 
@@ -243,7 +244,7 @@
     ridatadir = File.join(CONFIG['datadir'], 'ri/$(MAJOR).$(MINOR).$(TEENY)/system')
     Config.expand(ridatadir)
     makedirs [ridatadir]
-    install_recursive($rdocdir, ridatadir)
+    install_recursive($rdocdir, ridatadir, :mode => 0644)
   end
 end
 
@@ -324,7 +325,7 @@
     noinst << "win32.h"
   end
   noinst = nil if noinst.empty?
-  install_recursive("include", rubyhdrdir, :no_install => noinst, :glob => "*.h")
+  install_recursive("include", rubyhdrdir, :no_install => noinst, :glob => "*.h", :mode => 0644)
 end
 
 install?(:local, :comm, :man) do

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]