scripts/get_archive: allow changing sha256 on the fly

This commit is contained in:
CvH 2021-08-10 13:08:51 +02:00
parent 103edb022c
commit 4807ea751a

View File

@ -39,8 +39,13 @@ while [ ${NBWGET} -gt 0 -a ${NBCHKS} -gt 0 ]; do
[ -z "${PKG_SHA256}" -o "${PKG_SHA256}" = "${CALC_SHA256}" ] && break 2
build_msg "CLR_WARNING" "WARNING" "Incorrect checksum calculated on downloaded file: got ${CALC_SHA256} wanted ${PKG_SHA256}"
NBCHKS=$((NBCHKS - 1))
if [ "${CHANGE_HASH}" = "yes" ]; then
sed -e "s|^PKG_SHA256=.*|PKG_SHA256=\"${CALC_SHA256}\"|" -i "${PKG_DIR}/package.mk"
break 2
else
build_msg "CLR_WARNING" "WARNING" "Incorrect checksum calculated on downloaded file: got ${CALC_SHA256} wanted ${PKG_SHA256}"
NBCHKS=$((NBCHKS - 1))
fi
fi
done
NBWGET=$((NBWGET - 1))