summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2020-05-20 22:22:00 -0700
committerAdin Scannell <ascannell@google.com>2020-05-20 22:57:52 -0700
commit8437ef752d3c8e90327edad0164f3e4d003821c8 (patch)
tree6b83b52d1f32fecbd95f03103ddfe6deac0a77c5 /tools
parent8298c5bd4d1f836ee4c531a7bf04acff05d7099b (diff)
Normalize permissions in the go branch.
Fixes #2722
Diffstat (limited to 'tools')
-rwxr-xr-xtools/go_branch.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/go_branch.sh b/tools/go_branch.sh
index e568a0a76..093de89b4 100755
--- a/tools/go_branch.sh
+++ b/tools/go_branch.sh
@@ -88,6 +88,12 @@ EOF
# because they may correspond to unused templates, etc.
cp "${repo_orig}"/runsc/*.go runsc/
+# Normalize all permissions. The way bazel constructs the :gopath tree may leave
+# some strange permissions on files. We don't have anything in this tree that
+# should be execution, only the Go source files, README.md, and ${othersrc}.
+find . -type f -exec chmod 0644 {} \;
+find . -type d -exec chmod 0755 {} \;
+
# Update the current working set and commit.
git add . && git commit -m "Merge ${head} (automated)"