only write new buildnumber when actually download a new build

This commit is contained in:
Alex Kaplan 2015-09-15 18:39:14 -07:00
parent e395f755dd
commit ee1d5c8b17
1 changed files with 8 additions and 8 deletions

View File

@ -13,6 +13,7 @@ function require_directory {
function cache_download {
if [[ ! -f "${1}/${2}" ]]; then
echo "$BUILD" > ${FW_IMAGE_DIR}/build
wget -P "${FW_IMAGE_DIR}" "${LATEST_URL}images/${2}" ||
exit 1
@ -56,7 +57,6 @@ if [[ -z "${BUILD}" ]]; then
fi
require_directory "${FW_IMAGE_DIR}"
echo "$BUILD" > ${FW_IMAGE_DIR}/build
cache_download "${FW_IMAGE_DIR}" rootfs.ubi
cache_download "${FW_IMAGE_DIR}" sun5i-r8-chip.dtb
cache_download "${FW_IMAGE_DIR}" sunxi-spl.bin