From 4c1c2e00669c0e0453d09c119b4f31a649eecd87 Mon Sep 17 00:00:00 2001 From: Ian Leonard Date: Sat, 17 Nov 2018 05:45:24 +0000 Subject: [PATCH] scripts/get_archive: convert to build message helpers Signed-off-by: Ian Leonard --- scripts/get_archive | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/get_archive b/scripts/get_archive index a0591fa880..e550ca5640 100755 --- a/scripts/get_archive +++ b/scripts/get_archive @@ -16,8 +16,7 @@ lock_source_dir "${1}" _get_file_already_downloaded && exit 0 # At this point, we need to download something... -printf "%${BUILD_INDENT}c $(print_color CLR_GET "GET") ${1} (archive)\n" ' '>&$SILENT_OUT -export BUILD_INDENT=$((${BUILD_INDENT:-1}+${BUILD_INDENT_SIZE})) +build_msg "CLR_GET" "GET" "${1} (archive)" "indent" PACKAGE_MIRROR="${DISTRO_MIRROR}/${PKG_NAME}/${PKG_SOURCE_NAME}" [ "${VERBOSE}" != "yes" ] && WGET_OPT=-q @@ -37,7 +36,7 @@ while [ ${NBWGET} -gt 0 ]; do [ -z "${PKG_SHA256}" -o "${PKG_SHA256}" = "${CALC_SHA256}" ] && break 2 - printf "%${BUILD_INDENT}c $(print_color CLR_WARNING "WARNING") Incorrect checksum calculated on downloaded file: got ${CALC_SHA256} wanted ${PKG_SHA256}\n\n" ' '>&$SILENT_OUT + build_msg "CLR_WARNING" "WARNING" "Incorrect checksum calculated on downloaded file: got ${CALC_SHA256} wanted ${PKG_SHA256}" fi done NBWGET=$((NBWGET - 1)) @@ -46,7 +45,7 @@ done if [ ${NBWGET} -eq 0 ]; then die "\nCant't get ${1} sources : ${PKG_URL}\nTry later!" else - printf "%${BUILD_INDENT}c $(print_color CLR_INFO "INFO") Calculated checksum: ${CALC_SHA256}\n\n" ' '>&$SILENT_OUT + build_msg "CLR_INFO" "INFO" "Calculated checksum: ${CALC_SHA256}" echo "${PKG_URL}" > "${STAMP_URL}" echo "${CALC_SHA256}" > "${STAMP_SHA}" fi