check apk sha256

This commit is contained in:
Jean-Marie Mineau 2025-05-12 16:44:43 +02:00
parent 6643fef97f
commit ca38a9ada6
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2

View file

@ -30,6 +30,13 @@ androzoo() {
worker() {
for sha in $(cat "${TMP_DIR}/apks/${1}"); do
# Check the apk has the right sha256
if [ -f "${APK_DIR}/${sha}.apk" ]; then
if ! $(echo "${sha} "${APK_DIR}/${sha}.apk"" | sha256sum --check --status); then
rm "${APK_DIR}/${sha}.apk"
fi
fi
# Download if not already available
if [ ! -f "${APK_DIR}/${sha}.apk" ]; then
echo "Download ${sha}"
androzoo "${sha}"