diff options
author | Tom Marshall <tdm@cyngn.com> | 2015-11-18 14:45:04 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2015-11-20 14:24:37 -0800 |
commit | 517e6915cc7c9cabe17c58f7915a373549a1a315 (patch) | |
tree | 4e3125dfdd3c16cec6ffd1bbb8a07a5d5271f05d | |
parent | ffcd990922414eda1744a02ca266f26a05605f49 (diff) | |
download | vendor_replicant-517e6915cc7c9cabe17c58f7915a373549a1a315.zip vendor_replicant-517e6915cc7c9cabe17c58f7915a373549a1a315.tar.gz vendor_replicant-517e6915cc7c9cabe17c58f7915a373549a1a315.tar.bz2 |
backuptool: Use cut instead of awk
recovery has removed busybox in favor of toybox, and toybox does not
currently implement awk.
Change-Id: I9d91f52020e8a7b5b02dce27f3d82e6bf0aa1811
-rwxr-xr-x | prebuilt/common/bin/backuptool.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prebuilt/common/bin/backuptool.sh b/prebuilt/common/bin/backuptool.sh index 80e4e20..7ff0c88 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 |