Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorcyberkov <admin@cyberkov.at>2011-06-15 15:47:49 +0400
committercyberkov <admin@cyberkov.at>2011-06-15 15:48:40 +0400
commit94b152e7333151b7797269e7c536fd6274377e78 (patch)
tree7eef1ddadc3d1cdf54f7268d4201a31f0dab1d7f /lib
parentcba63030c998336dc58ee7e9b39cbd55baeb6f88 (diff)
fixed whitespace task mentioned in bug 1041
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/whitespace.rake6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/tasks/whitespace.rake b/lib/tasks/whitespace.rake
index 7af099dd6..66e2b056c 100644
--- a/lib/tasks/whitespace.rake
+++ b/lib/tasks/whitespace.rake
@@ -2,19 +2,19 @@ namespace :whitespace do
desc 'Removes trailing whitespace'
task :cleanup do
sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`;
- do cat $f | sed 's/[ \t]*$//' > tmp; cp tmp $f; rm tmp; echo -n .;
+ do sed -i 's/[ \t]*$//' $f; echo -n .;
done}
end
desc 'Converts hard-tabs into two-space soft-tabs'
task :retab do
sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`;
- do cat $f | sed 's/\t/ /g' > tmp; cp tmp $f; rm tmp; echo -n .;
+ do sed -i 's/\t/ /g' $f; echo -n .;
done}
end
desc 'Remove consecutive blank lines'
task :scrub_gratuitous_newlines do
sh %{for f in `find . -type f | grep -v -e '.git/' -e 'public/' -e '.png'`;
- do cat $f | sed '/./,/^$/!d' > tmp; cp tmp $f; rm tmp; echo -n .;
+ do sed -i '/./,/^$/!d' $f; echo -n .;
done}
end
end