From 517e6915cc7c9cabe17c58f7915a373549a1a315 Mon Sep 17 00:00:00 2001 From: Tom Marshall Date: Wed, 18 Nov 2015 14:45:04 -0800 Subject: [PATCH] backuptool: Use cut instead of awk recovery has removed busybox in favor of toybox, and toybox does not currently implement awk. Change-Id: I9d91f52020e8a7b5b02dce27f3d82e6bf0aa1811 --- prebuilt/common/bin/backuptool.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh index 80e4e209..7ff0c886 100755 --- a/prebuilt/common/bin/backuptool.sh +++ b/prebuilt/common/bin/backuptool.sh @@ -45,7 +45,7 @@ check_blacklist() { ## Discard any known bad backup scripts cd /$1/addon.d/ for f in *sh; do - s=$(md5sum $f | awk {'print $1'}) + s=$(md5sum $f | cut -c-32) grep -q $s /system/addon.d/blacklist && rm -f $f done fi @@ -57,7 +57,7 @@ check_whitelist() { ## forcefully keep any version-independent stuff cd /$1/addon.d/ for f in *sh; do - s=$(md5sum $f | awk {'print $1'}) + s=$(md5sum $f | cut -c-32) grep -q $s /system/addon.d/whitelist if [ $? -eq 0 ]; then found=1