summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2009-02-19 16:48:56 -0800
committerRyan Davis <ryand@zenspider.com>2009-02-19 16:48:56 -0800
commit4f07b73d1c387b1fa6e4fa8a9ce0c10070cc4086 (patch)
tree6c58aec753fa5978c2296119800b2b4a4c2d0344 /bin
parent90abd7e06981a6996da46a790aed24e539d1d945 (diff)
downloadhoe-4f07b73d1c387b1fa6e4fa8a9ce0c10070cc4086.tar.gz
Renamed all template files to xxx.erb. sow deals with that and renames dirs as well
[git-p4: depot-paths = "//src/hoe/dev/": change = 4627]
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sow8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/sow b/bin/sow
index fcfb1d5..23a6fa2 100755
--- a/bin/sow
+++ b/bin/sow
@@ -50,7 +50,13 @@ Dir.chdir project do
end
end
- paths.grep(/file_name/).each do |file|
+ paths.grep(/file_name|\.erb$/).each do |file|
+ new_file = file.sub(/file_name/, file_name).sub(/\.erb$/, '')
+ FileUtils.mv file, new_file, :verbose => true
+ end
+
+ dirs = (Dir["**/*"] + Dir["**/.*"]).select { |f| File.directory? f }.sort
+ dirs.grep(/file_name/).each do |file|
FileUtils.mv file, file.gsub(/file_name/, file_name), :verbose => true
end
end