Ensure that updating the file preserves its mode
Preserve the file mode when replacing it, this notably keeps docs/doxygen/regen.sh executable when running misc/scripts/inc_year. This uses GNU chmod --reference option which is not available on all systems, but it shouldn't be a problem in practice.
This commit is contained in:
parent
c09fd8b59d
commit
28d738e44a
1 changed files with 1 additions and 0 deletions
|
|
@ -37,6 +37,7 @@ run_sed() {
|
|||
rm $filename.$$
|
||||
msgc "unchanged"
|
||||
else
|
||||
chmod --reference=$filename $filename.$$
|
||||
mv $filename.$$ $filename
|
||||
msgc "done"
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue