Skip to content

Commit

Permalink
Make install put lib files in the right place.
Browse files Browse the repository at this point in the history
  • Loading branch information
drbrain committed Oct 19, 2007
1 parent 320c409 commit 2449c03
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions Rakefile
Expand Up @@ -250,6 +250,19 @@ end
desc "Build everything that needs to be built" desc "Build everything that needs to be built"
task :build => ['build:all'] 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" desc "Install rubinius as rbx"
task :install => :config_env do task :install => :config_env do
sh "cd shotgun; make install" sh "cd shotgun; make install"
Expand All @@ -258,19 +271,13 @@ task :install => :config_env do
mkdir_p ENV['CODEPATH'], :verbose => true mkdir_p ENV['CODEPATH'], :verbose => true


rba_files = Rake::FileList.new('runtime/**/*.rb{a,c}', rba_files = Rake::FileList.new('runtime/**/*.rb{a,c}',
'runtime/**/.load_order.txt', 'runtime/**/.load_order.txt')
'lib/**')


rba_files.sort.each do |rba_path| install_files rba_files, ENV['RBAPATH']
next if File.directory? rba_path


rba_file = rba_path.sub %r%^(runtime|lib)/%, '' lib_files = Rake::FileList.new 'lib/**/*'
dest_file = File.join ENV['RBAPATH'], rba_file
dest_dir = File.dirname dest_file
mkdir_p dest_dir unless File.directory? dest_dir


install rba_path, dest_file, :mode => 0644, :verbose => true install_files lib_files, ENV['CODEPATH']
end


mkdir_p File.join(ENV['CODEPATH'], 'bin'), :verbose => true mkdir_p File.join(ENV['CODEPATH'], 'bin'), :verbose => true


Expand Down

0 comments on commit 2449c03

Please sign in to comment.