check apk sha256
This commit is contained in:
parent
6643fef97f
commit
ca38a9ada6
1 changed files with 7 additions and 0 deletions
|
|
@ -30,6 +30,13 @@ androzoo() {
|
||||||
|
|
||||||
worker() {
|
worker() {
|
||||||
for sha in $(cat "${TMP_DIR}/apks/${1}"); do
|
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
|
if [ ! -f "${APK_DIR}/${sha}.apk" ]; then
|
||||||
echo "Download ${sha}"
|
echo "Download ${sha}"
|
||||||
androzoo "${sha}"
|
androzoo "${sha}"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue