Skip to content

Commit

Permalink
Fixing sed call in rake rename
Browse files Browse the repository at this point in the history
  • Loading branch information
winton committed Jun 29, 2010
1 parent 4009d8d commit 9c694c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ task :rename do
Dir["**/*"].each do |path|
next if path.include?('Rakefile')
if File.file?(path)
`sed -i 's/gem_template/#{name}/g' #{path}`
`sed -i 's/GemTemplate/#{camelize.call(name)}/g' #{path}`
`sed -i '' 's/gem_template/#{name}/g' #{path}`
`sed -i '' 's/GemTemplate/#{camelize.call(name)}/g' #{path}`
no_space = File.read(path).gsub(/\s+\z/, '')
File.open(path, 'w') { |f| f.write(no_space) }
end
Expand Down

0 comments on commit 9c694c8

Please sign in to comment.