public
Description: bindings for the SQLite 2.x embedded database
Homepage: http://sqlite-ruby.rubyforge.org/
Clone URL: git://github.com/jamis/sqlite-ruby.git
sqlite-ruby / install.rb
100644 28 lines (20 sloc) 0.61 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require 'fileutils'
 
FileUtils.mkdir_p "build"
 
FileUtils.cp %w{ext/extconf.rb ext/sqlite-api.c}, "build", :verbose => true
FileUtils.cp_r "lib", "build", :verbose => true
 
FileUtils.cd( "build", :verbose => true ) do
  extconf_args = ARGV.map { |a| a.inspect }.join( " " )
 
  unless system( "ruby extconf.rb #{extconf_args}" )
    puts "could not configure sqlite module"
    exit
  end
 
  unless system( "make" )
    puts "could not build sqlite module"
    exit
  end
 
  unless system( "make install" )
    puts "could not install sqlite module"
    exit
  end
end
 
FileUtils.rm_r "build", :verbose => true