mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
remove non-portable chmod
'chmod --reference' is not available on Mac OS X. Keeping the original file and directing edits into it preserves permissions and removes the need to chmod. (Tried 'sed -i' for inplace editing but unfortunately it isn't portable either.)
This commit is contained in:
committed by
Richard W.M. Jones
parent
ebb04b64a2
commit
873051e108
@@ -51,10 +51,9 @@ done
|
||||
"${args[@]}"
|
||||
|
||||
if [ -n "$output" ]; then
|
||||
mv "$output" "$output.tmp"
|
||||
cp -p "$output" "$output.tmp"
|
||||
|
||||
# Remove dependency_libs from output.
|
||||
sed "s/^dependency_libs=.*/dependency_libs=''/" < "$output.tmp" > "$output"
|
||||
chmod --reference="$output.tmp" "$output"
|
||||
rm "$output.tmp"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user