Author: ceros-guest
Date: 2008-05-07 03:41:58 +0000 (Wed, 07 May 2008)
New Revision: 6880

Modified:
   packages/trunk/vegastrike-data/debian/changelog
   packages/trunk/vegastrike-data/debian/rules
Log:
Fix lines that tests for executable/non-executable python scripts

Modified: packages/trunk/vegastrike-data/debian/changelog
===================================================================
--- packages/trunk/vegastrike-data/debian/changelog     2008-05-07 03:02:36 UTC 
(rev 6879)
+++ packages/trunk/vegastrike-data/debian/changelog     2008-05-07 03:41:58 UTC 
(rev 6880)
@@ -15,7 +15,7 @@
   * No longer need README.Debian.
   * Updated install paths.
   * Removing use of generic cargo stuff. File will remain in diff.
-  * Take care of lintian warnings with scripts.
+  * Take care of lintian warnings with python scripts.
 
  -- Andres Mejia <[EMAIL PROTECTED]>  Tue, 06 May 2008 16:04:23 -0400
 

Modified: packages/trunk/vegastrike-data/debian/rules
===================================================================
--- packages/trunk/vegastrike-data/debian/rules 2008-05-07 03:02:36 UTC (rev 
6879)
+++ packages/trunk/vegastrike-data/debian/rules 2008-05-07 03:41:58 UTC (rev 
6880)
@@ -26,15 +26,12 @@
        dh_install
 # Make files that are not executable non-executable
        find debian/vegastrike-data/usr/share/games/vegastrike -perm 755 -type 
f \
-               ! -regex '.*\.py$' -print0 | xargs -0 --no-run-if-empty chmod 
644
-# Find non-executable python scripts and set the appropriate permissions
+               ! -regex '.*\.py$$' -print0 | xargs -0 -r chmod 644
+# Set appropriate mode for python scripts based on first line of each script
        for PY in `find debian/vegastrike-data/usr/share/games/vegastrike -type 
f \
-               -regex '.*\.py$' -print0 | xargs -0 -r grep -e '^#!\s*\/usr' 
-L`; \
-               do chmod 644 $PY; done
-# Find executable python scripts and set the appropriate permissions
-       for PY in `find debian/vegastrike-data/usr/share/games/vegastrike -type 
f \
-               -regex '.*\.py$' -print0 | xargs -0 -r grep -e '^#!\s*\/usr' 
-l`; \
-               do chmod 755 $PY; done
+               -regex '.*\.py$$'`; do TEST=$$(head -n 1 $$PY | grep '^#!'); \
+               if [ "$$TEST" ]; then chmod 755 $$PY; else chmod 644 $$PY; fi; \
+               done
 
 # Build architecture-independent files here.
 binary-indep: install


_______________________________________________
Pkg-games-commits mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-games-commits

Reply via email to