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 1022cc7c50b551f01e33256439980353d9d58c8e.
Change-Id: I7f5a3510f64f0ecabfe9d15b5dbc1a667b210eb8
Signed-off-by: Adrian DC <radian.dc@gmail.com>
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh
index 0f2b043..e552fd7 100755
--- a/prebuilt/common/bin/backuptool.sh
+++ b/prebuilt/common/bin/backuptool.sh
@@ -48,7 +48,7 @@
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