diff options
author | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2017-07-22 12:54:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@open-infrastructure.net> | 2017-07-22 22:28:26 +0000 |
commit | dea0adef677620466c5a87d090fc6457b2b025b8 (patch) | |
tree | 6f162ae38d3425ae563783a91d72398ba04dc9b6 /share/scripts/curl | |
parent | Reshuffeling curl options handling in curl container create script. (diff) | |
download | compute-tools-dea0adef677620466c5a87d090fc6457b2b025b8.tar.xz compute-tools-dea0adef677620466c5a87d090fc6457b2b025b8.zip |
Adjusting messages output in curl container create script.
Signed-off-by: Daniel Baumann <daniel.baumann@open-infrastructure.net>
Diffstat (limited to '')
-rwxr-xr-x | share/scripts/curl | 10 |
1 files changed, 7 insertions, 3 deletions
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 |