aboutsummaryrefslogtreecommitdiffhomepage
path: root/build_tools
diff options
context:
space:
mode:
Diffstat (limited to 'build_tools')
-rwxr-xr-xbuild_tools/style.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/build_tools/style.fish b/build_tools/style.fish
index 27f89804..d2a44583 100755
--- a/build_tools/style.fish
+++ b/build_tools/style.fish
@@ -73,13 +73,13 @@ if set -q c_files[1]
echo Running clang-format
echo ========================================
for file in $c_files
+ cp $file $file.new # preserves mode bits
clang-format $file >$file.new
if cmp --quiet $file $file.new
echo $file was correctly formatted
rm $file.new
else
echo $file was NOT correctly formatted
- chmod --reference=$file $file.new
mv $file.new $file
end
end
@@ -101,13 +101,13 @@ if set -q f_files[1]
echo Running fish_indent
echo ========================================
for file in $f_files
+ cp $file $file.new # preserves mode bits
fish_indent <$file >$file.new
if cmp --quiet $file $file.new
echo $file was correctly formatted
rm $file.new
else
echo $file was NOT correctly formatted
- chmod --reference=$file $file.new
mv $file.new $file
end
end