[Libreoffice] [PATCH] removing the executable mode from some source files

Thomas Arnhold thomas at arnhold.org
Wed Mar 23 14:42:02 PDT 2011


Hi,

only short note from me: You won't find all wrong chmod'ed files with
the help of extensions. For example in bootstrap, there are the file
"post_download" or "download". These need to be executable.

You could check for these files if you do "head -n1 FILE" and look if
this first line has a /bin/bash or similar in it.

Thomas

On 03/23/2011 10:37 PM, saito wrote:
> Hi,
> 
> 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" <tlillqvist at 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
> 
> 
> 
> 
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice



More information about the LibreOffice mailing list