aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-06-11 15:28:40 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2016-06-11 15:28:40 -0700
commitd910aa15fe7eec40f2a452b7eb5fa8f1896c006d (patch)
tree61c8c5a5d3489c3ae06f929237aa93639f200e4c
parent5d20750aaa7bda68be0e0669083b59cbd737d6ee (diff)
Avoid using chmod --reference in style.fish
chmod --reference is not available on OS X Instead, we copy the source file into the temporary path, so that mode bits are preserved
-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