quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH 03/39] BSD compatibility: cp


From: Jean Delvare
Subject: [Quilt-dev] [PATCH 03/39] BSD compatibility: cp
Date: Sat, 19 Mar 2011 10:52:33 +0100
User-agent: quilt/0.48-17.1

Avoid using uncommon cp options which hurt portability. I fail to see
why we would need them anyway, as we are never working with symbolic
links by construction (quilt doesn't support them.)

Signed-off-by: Jean Delvare <address@hidden>
Reviewed-by: Raphael Hertzog <address@hidden>
---
 quilt/scripts/backup-files.in |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/quilt/scripts/backup-files.in
+++ b/quilt/scripts/backup-files.in
@@ -51,7 +51,7 @@ usage () {
 copy_file() {
        local from="$1"
        local to="$2"
-       cp -dp --remove-destination "$from" "$to"
+       cp -p "$from" "$to"
 }
 
 link_or_copy_file() {
@@ -72,7 +72,7 @@ ensure_nolinks() {
                basename=$(basename "$filename")
                # Temp file name is "path/to/.file.XXXXXX"
                tmpname=$(mktemp "${dirname}/.${basename}.XXXXXX")
-               cp -dp "$filename" "$tmpname"
+               cp -p "$filename" "$tmpname"
                mv "$tmpname" "$filename"
        fi
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]