From d910aa15fe7eec40f2a452b7eb5fa8f1896c006d Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Sat, 11 Jun 2016 15:28:40 -0700 Subject: 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 --- build_tools/style.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'build_tools') 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 -- cgit v1.2.3