[openstack-nova] maint: speed up sed manipulations
Pádraig Brady
pbrady at fedoraproject.org
Thu Apr 19 16:56:12 UTC 2012
commit 34054ec70b97c93e19220b489a7df9f9bff84226
Author: Pádraig Brady <P at draigBrady.com>
Date: Thu Apr 19 15:21:25 2012 +0100
maint: speed up sed manipulations
Edit multiple files per sed process,
by using the POSIX standardized '+' construct.
Quit after deleting first instance of an env line.
Note this doesn't save much as most files
don't have the env usage.
openstack-nova.spec | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/openstack-nova.spec b/openstack-nova.spec
index fccc52e..6652e6c 100644
--- a/openstack-nova.spec
+++ b/openstack-nova.spec
@@ -194,7 +194,7 @@ This package contains documentation files for nova.
find . \( -name .gitignore -o -name .placeholder \) -delete
-find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/d' {} \;
+find nova -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
%build
%{__python} setup.py build
More information about the scm-commits
mailing list