summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2009-02-24 16:12:19 -0800
committerRyan Davis <ryand@zenspider.com>2009-02-24 16:12:19 -0800
commit1ad5cbb4ca664f18f193191e12b765cbf11c1d92 (patch)
treee406ceabadb5fe1028ee96c8757529b2cae3214d
parent4f07b73d1c387b1fa6e4fa8a9ce0c10070cc4086 (diff)
downloadhoe-1ad5cbb4ca664f18f193191e12b765cbf11c1d92.tar.gz
Moved template dir renaming to front of copy process
[git-p4: depot-paths = "//src/hoe/dev/": change = 4642]
-rwxr-xr-xbin/sow11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/sow b/bin/sow
index 23a6fa2..50fd04c 100755
--- a/bin/sow
+++ b/bin/sow
@@ -38,8 +38,12 @@ end
FileUtils.cp_r template_path, project, :verbose => true
Dir.chdir project do
- paths = (Dir["**/*"] + Dir["**/.*"]).select { |f| File.file? f }.sort
+ dirs = 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
+ paths = (Dir["**/*"] + Dir["**/.*"]).select { |f| File.file? f }.sort
paths.each do |path|
file = File.read path
@@ -54,11 +58,6 @@ Dir.chdir project do
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
if $d || $t then