[Pkg-libvirt-commits] [libguestfs] 52/87: remove non-portable chmod

Hilko Bengen bengen at moszumanska.debian.org
Wed Feb 19 21:10:14 UTC 2014


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch debian
in repository libguestfs.

commit 06be39a28c72fa4f2632194fec6f0463f1e718e0
Author: Dan Lipsitt <danlipsitt at gmail.com>
Date:   Tue Jan 21 11:26:27 2014 -0800

    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.)
    
    (cherry picked from commit 873051e108eddfdd79205d0c8daf2654ad40e5d6)
---
 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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list