From 8cc3992a9f24337930d4da3e14a9025f7af62055 Mon Sep 17 00:00:00 2001 From: "Brint E. Kriebel" Date: Fri, 11 Jul 2014 18:44:15 -0700 Subject: [PATCH] otasigcheck: Fix the sed statement for multi-digit indices It appears that some versions of sed do not work with the + symbol. Instead of checking for one or more digits, check for a digit, followed by zero or more digits. Change-Id: I064df6a2bac4a634a3684ac1a5289dca1f4ba29c --- prebuilt/common/bin/otasigcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prebuilt/common/bin/otasigcheck.sh b/prebuilt/common/bin/otasigcheck.sh index a94bd6cd..ff756232 100644 --- a/prebuilt/common/bin/otasigcheck.sh +++ b/prebuilt/common/bin/otasigcheck.sh @@ -4,7 +4,7 @@ # system if [ -f /data/system/packages.xml -a -f /tmp/releasekey ]; then - relCert=$(grep -A3 'package name="com.android.htmlviewer"' /data/system/packages.xml | grep "cert index" | head -n 1 | sed -e 's|.*"\([[:digit:]]\+\)".*|\1|g') + relCert=$(grep -A3 'package name="com.android.htmlviewer"' /data/system/packages.xml | grep "cert index" | head -n 1 | sed -e 's|.*"\([[:digit:]][[:digit:]]*\)".*|\1|g') grep "cert index=\"$relCert\"" /data/system/packages.xml | grep -q `cat /tmp/releasekey` if [ $? -ne 0 ]; then