Merge "backuptool: only restore from same major.minor version" into cm-10.1

This commit is contained in:
Steve Kondik 2012-12-16 08:17:19 -08:00 committed by Gerrit Code Review
commit ed436c22d9
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
export C=/tmp/backupdir
export S=/system
export V=9
export V=10.1
backup_file() {
if [ -e "$1" ]; then

View File

@ -5,7 +5,7 @@
export C=/tmp/backupdir
export S=/system
export V=10
export V=10.1
# Preserve /system/addon.d in /tmp/addon.d
preserve_addon_d() {
@ -20,10 +20,10 @@ restore_addon_d() {
rm -rf /tmp/addon.d/
}
# Proceed only if /system is the expected major version
# Proceed only if /system is the expected major and minor version
check_prereq() {
if ( ! grep -q "^ro.cm.version=$V.*" /system/build.prop ); then
echo "Not backing up files from incompatible version."
echo "Not backing up files from incompatible version: $V"
exit 127
fi
}