install.rb 441 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env ruby
  2. require 'fileutils'
  3. include FileUtils::Verbose
  4. require 'rbconfig'
  5. include\
  6. begin
  7. RbConfig
  8. rescue NameError
  9. Config
  10. end
  11. sitelibdir = CONFIG["sitelibdir"]
  12. cd 'lib' do
  13. install('json.rb', sitelibdir)
  14. mkdir_p File.join(sitelibdir, 'json')
  15. for file in Dir['json/**/*}']
  16. d = File.join(sitelibdir, file)
  17. mkdir_p File.dirname(d)
  18. install(file, d)
  19. end
  20. end
  21. warn " *** Installed PURE ruby library."