backuptool: Preserve symlinks
Without -d, we copy the file sysmlinked rather than the symlink. Change-Id: Ie0fdd43f29e53334464188c846dd7a3b7bb770cc
This commit is contained in:
@@ -16,7 +16,7 @@ backup_file() {
|
|||||||
echo "Skipping odexed apk $1";
|
echo "Skipping odexed apk $1";
|
||||||
else
|
else
|
||||||
mkdir -p "$C/$D"
|
mkdir -p "$C/$D"
|
||||||
cp -p $1 "$C/$D/$F"
|
cp -dp $1 "$C/$D/$F"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,7 @@ restore_file() {
|
|||||||
if [ ! -d "$DIR" ]; then
|
if [ ! -d "$DIR" ]; then
|
||||||
mkdir -p "$DIR";
|
mkdir -p "$DIR";
|
||||||
fi
|
fi
|
||||||
cp -p "$C/$DIR/$FILE" "$1";
|
cp -dp "$C/$DIR/$FILE" "$1";
|
||||||
if [ -n "$2" ]; then
|
if [ -n "$2" ]; then
|
||||||
echo "Deleting obsolete file $2"
|
echo "Deleting obsolete file $2"
|
||||||
rm "$2";
|
rm "$2";
|
||||||
|
Reference in New Issue
Block a user