[DRE-commits] r4946 - trunk/libffi-ruby/debian

Micah Anderson micah at alioth.debian.org
Tue Mar 16 23:05:50 UTC 2010


Author: micah
Date: 2010-03-16 23:05:43 +0000 (Tue, 16 Mar 2010)
New Revision: 4946

Modified:
   trunk/libffi-ruby/debian/post-install.rb
Log:
better way to do the version stuff

Modified: trunk/libffi-ruby/debian/post-install.rb
===================================================================
--- trunk/libffi-ruby/debian/post-install.rb	2010-03-16 22:38:21 UTC (rev 4945)
+++ trunk/libffi-ruby/debian/post-install.rb	2010-03-16 23:05:43 UTC (rev 4946)
@@ -2,12 +2,7 @@
 # Load the fresh installed ffi release
 
 RUBY_MAJOR = RUBY_VERSION.match(/^\d+\.\d+/).to_s
-if RUBY_MAJOR == "1.9"
-then
-	RUBY_MINOR = "." + RUBY_VERSION.match(/\d+\Z/).to_s
-else	
-	RUBY_MINOR = ""
-end
+RUBY_MINOR = RUBY_MAJOR == "1.9" ? "." + RUBY_VERSION.match(/\d+$/).to_s : ''
 
 paths = %w["./debian/libffi-ruby#{RUBY_MAJOR}#{RUBY_MINOR}/usr/lib/ruby/ ./debian/libffi-ruby#{RUBY_MAJOR}#{RUBY_MINOR}/usr/lib/ruby/#{RUBY_MAJOR}#{RUBY_MINOR}/ ./debian/libffi-ruby#{RUBY_MAJOR}#{RUBY_MINOR}/usr/lib/ruby/#{RUBY_MAJOR}#{RUBY_MINOR}/ffi/ ./debian/libffi-ruby#{RUBY_MAJOR}#{RUBY_MINOR}/usr/lib/ruby/#{RUBY_MAJOR}#{RUBY_MINOR}/#{RUBY_PLATFORM}/"]
 




More information about the Pkg-ruby-extras-commits mailing list