[eclipse-pydev] Conditionally chmod files (if there *are* any 644 files)
Andrew Overholt
overholt at fedoraproject.org
Thu Apr 28 21:25:44 UTC 2011
commit 407b9c89c9092bc48509d99ddc5c30c9909d21eb
Author: Andrew Overholt <overholt at redhat.com>
Date: Thu Apr 28 17:25:24 2011 -0400
Conditionally chmod files (if there *are* any 644 files)
eclipse-pydev.spec | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/eclipse-pydev.spec b/eclipse-pydev.spec
index f497429..1ae041e 100644
--- a/eclipse-pydev.spec
+++ b/eclipse-pydev.spec
@@ -200,7 +200,10 @@ popd
# rename cgi.py's shebang from /usr/local/bin/python to /usr/bin/env python
sed -i 's/\/usr\/local\/bin\/python/\/usr\/bin\/env python/' ${RPM_BUILD_ROOT}%{install_loc}/pydev/eclipse/plugins/org.python.pydev.jython_%{version}.%{qualifier}/Lib/cgi.py
# convert .py$ files from mode 0644 to mode 0755
-chmod 0755 `find ${RPM_BUILD_ROOT} -name '*\.py' -perm 0644 | xargs`
+sixFourFourfiles=$(find ${RPM_BUILD_ROOT} -name '*\.py' -perm 0644 | xargs)
+if [ ${sixFourFourfiles:-0} -ne 0 ]; then
+ chmod 0755 ${sixFourFourfiles}
+fi
%files
%defattr(-,root,root,-)
More information about the scm-commits
mailing list