backuptool: Preserve symlinks
Without -d, we copy the file sysmlinked rather than the symlink.
Change-Id: Ie0fdd43f29e53334464188c846dd7a3b7bb770cc
diff --git a/prebuilt/common/bin/backuptool.functions b/prebuilt/common/bin/backuptool.functions
index ff599f1..b3610e7 100644
--- a/prebuilt/common/bin/backuptool.functions
+++ b/prebuilt/common/bin/backuptool.functions
@@ -14,7 +14,7 @@
echo "Skipping odexed apk $1"
else
mkdir -p "$C/$D"
- cp -p "$1" "$C/$D/$F"
+ cp -dp "$1" "$C/$D/$F"
if [ $DEBUG -eq 1 ]; then
echo backup_file "$1" "$C/$D/$F"
fi
@@ -29,7 +29,7 @@
if [ ! -d "$DIR" ]; then
mkdir -p "$DIR"
fi
- cp -p "$C/$DIR/$FILE" "$1"
+ cp -dp "$C/$DIR/$FILE" "$1"
if [ $DEBUG -eq 1 ]; then
echo restore_file "$C/$DIR/$FILE" "$1"
fi