backuptool: Support tab-delimited fstab

Change-Id: Ib3fcde92d0c1ebb8754b11c577e4885d8dd02624
This commit is contained in:
Erik Jensen
2021-04-30 05:42:41 +00:00
committed by Alessandro Astone
parent 6b4ffc913d
commit 31a8d98385
2 changed files with 2 additions and 2 deletions

View File

@@ -104,7 +104,7 @@ unmount_system() {
}
get_block_for_mount_point() {
grep -v "^#" /etc/recovery.fstab | grep " $1 " | tail -n1 | tr -s ' ' | cut -d' ' -f1
grep -v "^#" /etc/recovery.fstab | grep "[[:blank:]]$1[[:blank:]]" | tail -n1 | tr -s [:blank:] ' ' | cut -d' ' -f1
}
find_block() {

View File

@@ -95,7 +95,7 @@ fi
### Mount helpers ###
#####################
get_block_for_mount_point() {
grep -v "^#" /vendor/etc/fstab.$(getprop ro.boot.hardware) | grep " $1 " | tail -n1 | tr -s ' ' | cut -d' ' -f1
grep -v "^#" /vendor/etc/fstab.$(getprop ro.boot.hardware) | grep "[[:blank:]]$1[[:blank:]]" | tail -n1 | tr -s [:blank:] ' ' | cut -d' ' -f1
}
find_block() {