Browse code

Fail explicitly if curl is missing in contrib/download-frozen-image.sh

Signed-off-by: Andrew "Tianon" Page <admwiggin@gmail.com>

Tianon Gravi authored on 2015/03/18 14:08:17
Showing 2 changed files
... ...
@@ -12,6 +12,7 @@ FROM debian:jessie
12 12
 # https://github.com/docker/docker/blob/master/project/PACKAGERS.md#runtime-dependencies
13 13
 RUN apt-get update && apt-get install -y --no-install-recommends \
14 14
 		btrfs-tools \
15
+		curl \
15 16
 		gcc \
16 17
 		git \
17 18
 		golang \
... ...
@@ -7,6 +7,11 @@ set -e
7 7
 # debian                           latest              f6fab3b798be        10 weeks ago        85.1 MB
8 8
 # debian                           latest              f6fab3b798be3174f45aa1eb731f8182705555f89c9026d8c1ef230cbf8301dd   10 weeks ago        85.1 MB
9 9
 
10
+if ! command -v curl &> /dev/null; then
11
+	echo >&2 'error: "curl" not found!'
12
+	exit 1
13
+fi
14
+
10 15
 usage() {
11 16
 	echo "usage: $0 dir image[:tag][@image-id] ..."
12 17
 	echo "   ie: $0 /tmp/hello-world hello-world"