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:
Dan Lipsitt
2014-01-21 11:26:27 -08:00
committed by Richard W.M. Jones
parent ebb04b64a2
commit 873051e108

View File

@@ -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