Permalink
Browse files

Fixing sed call in rake rename

  • Loading branch information...
1 parent 4009d8d commit 9c694c8283bc88d1d1b7b97548188b3a91846222 @winton committed Jun 29, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 Rakefile
View
@@ -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

0 comments on commit 9c694c8

Please sign in to comment.