Re: [Libguestfs] [libguestfs] remove non-portable chmod from libtool-kill-dependency_libs.sh (#10)
Attaching the patch to the mailing list. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
On Tue, Jan 21, 2014 at 08:23:08PM +0000, Richard W.M. Jones wrote:
Attaching the patch to the mailing list.
Rich.
-- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
From 08e271bc0f08814165425306b9a9265e37a06e63 Mon Sep 17 00:00:00 2001 From: Dan Lipsitt <danlipsitt@gmail.com> Date: Tue, 21 Jan 2014 11:26:27 -0800 Subject: [PATCH] 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.) --- libtool-kill-dependency_libs.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/libtool-kill-dependency_libs.sh b/libtool-kill-dependency_libs.sh index 3d5f318..73489df 100755 --- a/libtool-kill-dependency_libs.sh +++ b/libtool-kill-dependency_libs.sh @@ -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 -- 1.8.5.1
Thanks, ACKed and will push shortly. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
participants (1)
-
Richard W.M. Jones