summaryrefslogtreecommitdiffstats
path: root/share/scripts/curl
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xshare/scripts/curl44
1 files changed, 26 insertions, 18 deletions
diff --git a/share/scripts/curl b/share/scripts/curl
index f3e4927..4f575f9 100755
--- a/share/scripts/curl
+++ b/share/scripts/curl
@@ -193,30 +193,38 @@ do
fi
done
-if [ -e "${CACHE}/${IMAGE}.sha512" ] && [ -e "${CACHE}/${IMAGE}" ]
-then
- echo -n "Verifying ${IMAGE}:"
-
+for FILE in "${CACHE}/$(basename ${IMAGE})"
+do
cd "${CACHE}"
- set +e
- sha512sum --check "${IMAGE}.sha512" --status
- SHA512SUM="${?}"
+ if [ ! -e "${FILE}" ]
+ then
+ continue
+ fi
- case "${SHA512SUM}" in
- 0)
- echo " ok."
- ;;
+ if [ -e "${FILE}.sha512" ]
+ then
+ echo -n "Verifying ${IMAGE}:"
- *)
- echo " failed."
- exit 1
- ;;
- esac
+ set +e
+ sha512sum --check "${IMAGE}.sha512" --status
+ SHA512SUM="${?}"
+ set -e
+
+ case "${SHA512SUM}" in
+ 0)
+ echo " ok."
+ ;;
+
+ *)
+ echo " failed."
+ exit 1
+ ;;
+ esac
+ fi
- set -e
cd "${OLDPWD}"
-fi
+done
mkdir -p "${MACHINES}/${NAME}"