diff options
author | osm0sis <osm0sis@outlook.com> | 2017-07-04 15:47:31 -0300 |
---|---|---|
committer | osm0sis <osm0sis@outlook.com> | 2017-07-04 15:47:31 -0300 |
commit | b91ec4deda638c477c7c786ebe317f71c6521cc0 (patch) | |
tree | da8931e9dc84bac988b83646887e98cab9c043da | |
parent | adc21ed2c37503b540b5fbc18af0ca46bdf24cf8 (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-x | tools/ak2-core.sh | 4 |
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 |