Set execute bit on files if and only if they begin with (#!). (#7347)

* Set execute bit on files if and only if they begin with (#!).

Git only tracks the 'x' (executable) bit on each file. Prior to this
CL, our files were a random mix of executable and non-executable.
This change imposes some order by making files executable if and only
if they have shebang (#!) lines at the beginning.

We don't have any executable binaries checked into the repo, so
we shouldn't need to worry about that case.

* Added fix_permissions.sh script to set +x iff a file begins with (#!).
pull/7352/head
Joshua Haberman 2020-04-01 15:28:25 -07:00 committed by GitHub
parent e667bf6eaa
commit c649397029
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
166 changed files with 8 additions and 0 deletions

0
benchmarks/python/py_benchmark.py Executable file → Normal file
View File

0
benchmarks/util/result_parser.py Executable file → Normal file
View File

0
benchmarks/util/result_uploader.py Executable file → Normal file
View File

0
conformance/conformance_php.php Executable file → Normal file
View File

0
conformance/text_format_failure_list_java.txt Executable file → Normal file
View File

0
csharp/install_dotnet_sdk.ps1 Normal file → Executable file
View File

0
examples/README.md Executable file → Normal file
View File

8
fix_permissions.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
for file in $(find . -type f); do
if [ "$(head -c 2 $file)" == "#!" ]; then
chmod u+x $file
else
chmod a-x $file
fi
done

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

0
java/lite/proguard.pgcfg Executable file → Normal file
View File

View File

Some files were not shown because too many files have changed in this diff Show More