scripts/hash_browser_app: prepare for multiple signatures and set safe bash opts
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
c513722a30
commit
805c7bfcf1
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
PACKAGE_NAME="$(aapt dump badging "$1" | grep package: | grep -Eo " name='[a-zA-Z0-9_\.]*" | cut -c8-)"
|
||||
HASH="$(apksigner verify --print-certs "$1" | grep "#1 certificate SHA-256" | grep -Eo "[a-f0-9]{64}" | tr -d '\n' | xxd -r -p | base64)"
|
||||
echo "\"$PACKAGE_NAME\" to \"$HASH\""
|
||||
echo "\"$PACKAGE_NAME\" to arrayOf(\"$HASH\")"
|
||||
|
||||
|
|
Loading…
Reference in a new issue