From dea0adef677620466c5a87d090fc6457b2b025b8 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 22 Jul 2017 14:54:42 +0200 Subject: Adjusting messages output in curl container create script. Signed-off-by: Daniel Baumann --- share/scripts/curl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'share/scripts/curl') diff --git a/share/scripts/curl b/share/scripts/curl index 8ceb7c2..f3e4927 100755 --- a/share/scripts/curl +++ b/share/scripts/curl @@ -169,7 +169,6 @@ done # FIXME: gpg verification against debian-keyring or local keyring # FIXME: default server via configuration file -echo "Downloading ${IMAGE}" mkdir -p "${CACHE}" CURL_OPTIONS="" @@ -188,6 +187,7 @@ for FILE in "${SERVER}/${IMAGE}" "${SERVER}/${IMAGE}.sha512" do if curl --fail --head --output /dev/null --silent "${FILE}" then + echo "Downloading $(basename ${FILE})" curl --fail --location --progress-bar --user-agent container-tools/${VERSION} ${CURL_OPTIONS} \ "${FILE}" -o "${CACHE}/$(basename ${FILE})" fi @@ -195,7 +195,7 @@ done if [ -e "${CACHE}/${IMAGE}.sha512" ] && [ -e "${CACHE}/${IMAGE}" ] then - echo -n "Verifying ${IMAGE}.sha512" + echo -n "Verifying ${IMAGE}:" cd "${CACHE}" set +e @@ -218,7 +218,6 @@ then cd "${OLDPWD}" fi -echo "Unpacking ${IMAGE}" mkdir -p "${MACHINES}/${NAME}" case "${IMAGE}" in @@ -231,6 +230,7 @@ case "${IMAGE}" in if [ ! -e /usr/bin/lzip ] then + echo -en "\n" echo "'${NAME}': /usr/bin/lzip - no such file." >&2 exit 1 fi @@ -241,6 +241,7 @@ case "${IMAGE}" in if [ ! -e /usr/bin/xz ] then + echo -en "\n" echo "'${NAME}': /usr/bin/xz - no such file." >&2 exit 1 fi @@ -253,9 +254,12 @@ esac if [ -e /usr/bin/pv ] then + echo "Unpacking ${IMAGE}" pv --format '%p' --width 77 "${CACHE}/${IMAGE}" | tar xf - ${TAR_OPTIONS} -C "${MACHINES}/${NAME}" --strip 1 else + echo -n "Unpacking ${IMAGE}:" tar xf "${CACHE}/${IMAGE}" ${TAR_OPTIONS} -C "${MACHINES}/${NAME}" --strip 1 + echo " ok." fi # Creating machine-id -- cgit v1.2.3