Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make install put lib files in the right place.

  • Loading branch information...
commit 2449c0347bcf31050c3002853808b4e69affc57a 1 parent 320c409
Eric Hodel drbrain authored
Showing with 17 additions and 10 deletions.
  1. +17 −10 Rakefile
27 Rakefile
View
@@ -250,6 +250,19 @@ end
desc "Build everything that needs to be built"
task :build => ['build:all']
+def install_files(files, destination)
+ files.sort.each do |path|
+ next if File.directory? path
+
+ file = path.sub %r%^(runtime|lib)/%, ''
+ dest_file = File.join destination, file
+ dest_dir = File.dirname dest_file
+ mkdir_p dest_dir unless File.directory? dest_dir
+
+ install path, dest_file, :mode => 0644, :verbose => true
+ end
+end
+
desc "Install rubinius as rbx"
task :install => :config_env do
sh "cd shotgun; make install"
@@ -258,19 +271,13 @@ task :install => :config_env do
mkdir_p ENV['CODEPATH'], :verbose => true
rba_files = Rake::FileList.new('runtime/**/*.rb{a,c}',
- 'runtime/**/.load_order.txt',
- 'lib/**')
+ 'runtime/**/.load_order.txt')
- rba_files.sort.each do |rba_path|
- next if File.directory? rba_path
+ install_files rba_files, ENV['RBAPATH']
- rba_file = rba_path.sub %r%^(runtime|lib)/%, ''
- dest_file = File.join ENV['RBAPATH'], rba_file
- dest_dir = File.dirname dest_file
- mkdir_p dest_dir unless File.directory? dest_dir
+ lib_files = Rake::FileList.new 'lib/**/*'
- install rba_path, dest_file, :mode => 0644, :verbose => true
- end
+ install_files lib_files, ENV['CODEPATH']
mkdir_p File.join(ENV['CODEPATH'], 'bin'), :verbose => true
Please sign in to comment.
Something went wrong with that request. Please try again.