I have written an simple script based on find and file commands.
To use it, first it needs to set the exclusion pattern inside the script.
After that, you can run the script using "test" as argument to list the files that are not meant to be executable, example:
./find-non-executables-with-execution-bit.sh test
and use "execute" as argument to unset execution bit from all files that have execution bit but are not executable using "file command", example:
./find-non-executables-with-execution-bit.sh execute
Note: The exclusion pattern was needed because I have noted that some perl files are not using shebang, so the "file command" cannot detect it as executable.
Can you send me the git-hook pre-commit so I can try to modify it to make this tests automatically?
Francisco Kem Iti Saito
4linux
Em 23/03/2011 às 12:34 horas, "Tor Lillqvist" <tlillqv...@novell.com> escreveu:
> OK. I will pass something like this (with more extensions) on all source
> tree and will send patches after this:
>
> find -name "*.cxx" -o -name "*.hxx" -o -name "*.mk" -exec chmod -x '{}' \;
Thanks, but it is simpler to just send the script, once you have a good set of file extensions to handle. We can still commit the resulting change giving you credit.
(Also, much faster to use -print0 | xargs -0 chmod -x.)
--tml
find-non-executables-with-execution-bit.sh
Description: Binary data_______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice