backuptool: Resolve incompatible version grep syntax

* The grep errorlevel output was not properly used by the if,
    therefore allowing a device to upgrade with old addons
    instead of aborting the backuptool steps

 * The LineageOS versions properties were removed from the build.prop,
    which is resolved properly in commit:
    "lineage: Keep LineageOS versions properties in build.prop"
    Change-Id: I0060141c097b3d14c3710eee1e0caf7110634967

 * Introduced in the following commit:
    "backuptool: Take into account new location for system default props"
    Change-Id: I62046447876c2198a0c4f88a4f36f4723d417617

This reverts commit 1022cc7c50.
Change-Id: I7f5a3510f64f0ecabfe9d15b5dbc1a667b210eb8
Signed-off-by: Adrian DC <radian.dc@gmail.com>
gugelfrei
Adrian DC 6 years ago committed by Bruno Martins
parent 29fca646a6
commit 05ab72add7

@ -48,7 +48,7 @@ check_prereq() {
if [ ! -r /system/build.prop ]; then
return 0
fi
if [ ! grep -q "^ro.lineage.version=$V.*" /system/etc/prop.default /system/build.prop ]; then
if ! grep -q "^ro.lineage.version=$V.*" /system/build.prop; then
echo "Not backing up files from incompatible version: $V"
return 0
fi

Loading…
Cancel
Save