seL4_tools icon indicating copy to clipboard operation
seL4_tools copied to clipboard

style-cmake.sh should not reset file mode

Open lsf37 opened this issue 4 years ago • 1 comments

style-cmake.sh resets the file mode, using cmake-format with -i which always produces 644 files.

It'd be nice to keep the original file mode, since we have some cmake files that are intentionally 755.

This could be achieved in style-cmake.sh by processing files one by one, using stat to read the mode, then chmod to set it afterwards, or some such thing. Downside is that this probably will make it quite hard to deal with file names that have spaces in them.

Alternatively, we could do something similar in python inside style.py.

lsf37 avatar Sep 03 '21 05:09 lsf37

(I don't think the mode reset is intentional by cmake-format)

lsf37 avatar Sep 03 '21 05:09 lsf37