instiki/vendor/rails/railties/bin/rails

21 lines
588 B
Plaintext
Raw Normal View History

2010-05-25 19:45:45 +02:00
$:.unshift File.expand_path("../../lib", __FILE__)
require 'ruby_version_check'
2007-01-22 14:43:50 +01:00
Signal.trap("INT") { puts; exit }
2010-05-25 19:45:45 +02:00
require 'rails/version'
2007-01-22 14:43:50 +01:00
if %w(--version -v).include? ARGV.first
puts "Rails #{Rails::VERSION::STRING}"
exit(0)
end
freeze = ARGV.any? { |option| %w(--freeze -f).include?(option) }
app_path = ARGV.first
2010-05-25 19:45:45 +02:00
require 'rails_generator'
2007-01-22 14:43:50 +01:00
require 'rails_generator/scripts/generate'
2010-05-25 19:45:45 +02:00
2007-01-22 14:43:50 +01:00
Rails::Generator::Base.use_application_sources!
Rails::Generator::Scripts::Generate.new.run(ARGV, :generator => 'app')
Dir.chdir(app_path) { `rake rails:freeze:gems`; puts "froze" } if freeze