Sha256: 0310c3d2507ff8fe1eaa2aa2fd4e133595175ef897e130426da14972f5a33bb7
Contents?: true
Size: 1.4 KB
Versions: 2
Compression:
Stored size: 1.4 KB
Contents
#!/usr/bin/env ruby raise "Not the right place #{Dir.pwd}" unless File.directory?('lib') #scripts = (Dir['lib/*.rb'] + Dir['lib/**/*']).uniq #scripts = scripts.reject{ |f| File.directory?(f) } # We don't want the rake helper. #scripts = scripts - ["lib/setup/rake.rb"] #scripts = scripts + ["bin/setup.rb"] scripts = %w{ lib/setup.rb lib/setup/core_ext.rb lib/setup/constants.rb lib/setup/project.rb lib/setup/session.rb lib/setup/base.rb lib/setup/compiler.rb lib/setup/configuration.rb lib/setup/documentor.rb lib/setup/installer.rb lib/setup/tester.rb lib/setup/uninstaller.rb lib/setup/command.rb bin/setup.rb } comment = <<-HERE # # Setup.rb, #{Time.now.strftime("%Y-%m-%d %H:%M:%S")} # # This is a stand-alone bundle of the setup.rb application. # You can place it in your projects script/ directory, or # rename it to 'setup.rb' and place it in your project's # root directory (just like old times). # HERE # bundle = "" # insert scripts scripts.each do |script| bundle << "\n\n# %-16s #{"#" * 60}\n\n" % File.basename(script) bundle << File.read(script) end # remove setup requires bundle.gsub!(/require\s+["']setup\/(.*?)["']\s*$/, '') # remove blank lines bundle.gsub!(/^\s*\n/, '') # remove comments bundle.gsub!(/^\s*\#.*?\n/, '') # save File.open('script/setup', 'w') do |f| f << "#!/usr/bin/env ruby\n" f << comment f << bundle end FileUtils.chmod(0744, 'script/setup')
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
setup-5.0.1 | script/bundle |
setup-5.0.0 | script/bundle |