forked from toland/app_version
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinstall.rb
More file actions
14 lines (10 loc) · 680 Bytes
/
install.rb
File metadata and controls
14 lines (10 loc) · 680 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# copy the version.yml.erb to some user editable location for example, in lib
targetTemplateDir = File.join(RAILS_ROOT, 'lib/templates')
sourceTemplateFile = File.join(File.dirname(__FILE__), 'lib/templates/version.yml.erb')
sourceSampleFile = File.join(File.dirname(__FILE__), 'lib/templates/version.yml')
targetSampleDir = File.join(RAILS_ROOT, '/config')
FileUtils.mkdir( targetTemplateDir, :verbose => true) unless File.exists?(targetTemplateDir)
FileUtils.cp( sourceTemplateFile, targetTemplateDir,:verbose => true)
FileUtils.cp( sourceSampleFile, targetSampleDir, :verbose => true )
# Show the README text file
# puts IO.read(File.join(File.dirname(__FILE__), 'README'))