summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorosm0sis <osm0sis@outlook.com>2017-07-04 15:47:31 -0300
committerosm0sis <osm0sis@outlook.com>2017-07-04 15:47:31 -0300
commitb91ec4deda638c477c7c786ebe317f71c6521cc0 (patch)
treeda8931e9dc84bac988b83646887e98cab9c043da
parentadc21ed2c37503b540b5fbc18af0ca46bdf24cf8 (diff)
AK2: better fix for unknown hash type
- https://github.com/osm0sis/AnyKernel2/commit/45bfc5d602582c53433bd2398bdc5876a7e260c9 broke the error catching on unpackbootimg - more easily worked around during repack, see linked commit for rationale for the assumption
-rwxr-xr-xtools/ak2-core.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/ak2-core.sh b/tools/ak2-core.sh
index a099b6f..8cc609c 100755
--- a/tools/ak2-core.sh
+++ b/tools/ak2-core.sh
@@ -59,9 +59,6 @@ dump_boot() {
$bin/pxa1088-unpackbootimg -i /tmp/anykernel/boot.img -o $split_img;
else
$bin/unpackbootimg -i /tmp/anykernel/boot.img -o $split_img;
- if [ "$(cat $split_img/boot.img-hash)" == "unknown" ]; then
- echo "sha1" > $split_img/boot.img-hash;
- fi;
fi;
if [ $? != 0 -o "$dumpfail" ]; then
ui_print " "; ui_print "Dumping/splitting image failed. Aborting..."; exit 1;
@@ -129,6 +126,7 @@ write_boot() {
fi;
if [ -f *-hash ]; then
hash=`cat *-hash`;
+ test "$hash" == "unknown" && hash=sha1;
hash="--hash $hash";
fi;
if [ -f *-unknown ]; then