Skip to content

Commit

Permalink
remove non-portable chmod
Browse files Browse the repository at this point in the history
'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.)

(cherry picked from commit 873051e)
  • Loading branch information
DanLipsitt authored and rwmjones committed Feb 12, 2014
1 parent c4be51d commit 06be39a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libtool-kill-dependency_libs.sh
Expand Up @@ -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

0 comments on commit 06be39a

Please sign in to comment.