summaryrefslogtreecommitdiffstats
path: root/share/scripts/curl
diff options
context:
space:
mode:
Diffstat (limited to 'share/scripts/curl')
-rwxr-xr-xshare/scripts/curl10
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