[pkg-fgfs-crew] [PATCH 5/6] Replace about 12500 chmod calls with approx. 1

Florent Rougon f.rougon at free.fr
Mon Nov 3 13:51:05 UTC 2014


debian/rules: replace a call of the form:

  find ... -type f -exec chmod 644 {} \;

with:

  find ... -type f -execdir chmod 644 '{}' +

which does the same with a minimum number of invocations of the chmod
command (from the find(1) Info documentation: "This expansion is done in
such a way as to avoid exceeding the maximum command line length
available on the system").

Note: according to the same documentation, -execdir is more secure than
      -exec, however I don't think it has any impact in this case.
---
 debian/rules |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 0be03d6..e216a13 100755
--- a/debian/rules
+++ b/debian/rules
@@ -78,7 +78,7 @@ override_dh_auto_install:
 
 # Fix some insane permissions
 	find $(CURDIR)/debian/flightgear-data-*/usr/share/games/flightgear \
-		-type f -exec chmod 644 {} \;
+		-type f -execdir chmod 644 '{}' +
 	chmod a+x $(CURDIR)/debian/flightgear-data-base/usr/share/games/flightgear/Textures.high/Trees/convert.pl
 
 # Drop some silly Windows PE32 executable files
-- 
1.7.10.4




More information about the pkg-fgfs-crew mailing list