lkml.org 
[lkml]   [2018]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subjectgit source files with rw permissions
From
Date
Some .c source files have r.x permissions (0755) that
should be updated.

A trivial script on a clean git tree like:

$ git ls-files -- "*.[chsS]" | \
xargs ls -la | \
grep -P "^[^l](?:.{2,2}x|.{5,5}x|.{8,8}x)" | \
awk '{print $9}'

today shows:

drivers/gpu/drm/amd/amdgpu/vce_v4_0.c
drivers/net/ethernet/cadence/macb_ptp.c

It would be good to update those via some script like:

$ git ls-files -- "*.[chsS]" | \
xargs ls -la | \
grep -P
"^[^l](?:.{2,2}x|.{5,5}x|.{8,8}x)" | \
awk '{print $9}' | \
xargs
chmod 644
tmpfile=$(mktemp)
echo "treewide: chmod executable source files
to 0644" > $tmpfile
git commit -s -a -F $tmpfile
rm -f $tmpfile

\
 
 \ /
  Last update: 2018-04-06 02:54    [W:0.042 / U:5.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site