From 148c243cc99b485cd02e975482e97ebbca4a9eb4 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Tue, 26 May 2015 11:38:53 -0700 Subject: [PATCH] Add "-f" to curl invocations --- .template-helpers/generate-dockerfile-links-partial.sh | 2 +- .template-helpers/variant.sh | 6 +++--- update.sh | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.template-helpers/generate-dockerfile-links-partial.sh b/.template-helpers/generate-dockerfile-links-partial.sh index 13397fdfa..e985ea7e3 100755 --- a/.template-helpers/generate-dockerfile-links-partial.sh +++ b/.template-helpers/generate-dockerfile-links-partial.sh @@ -9,7 +9,7 @@ if [ -z "$repo" ]; then fi IFS=$'\n' -lines=( $(curl -sSL 'https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" | grep -vE '^$|^#') ) +lines=( $(curl -fsSL 'https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" | grep -vE '^$|^#') ) unset IFS repoDirs=() diff --git a/.template-helpers/variant.sh b/.template-helpers/variant.sh index 1f6c7af27..88ebbcce6 100755 --- a/.template-helpers/variant.sh +++ b/.template-helpers/variant.sh @@ -12,7 +12,7 @@ dir="$(dirname "$(readlink -f "$BASH_SOURCE")")" url='https://raw.githubusercontent.com/docker-library/official-images/master/library/'"$repo" IFS=$'\n' -tags=( $(curl -sSL "$url" | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) +tags=( $(curl -fsSL "$url" | grep -vE '^$|^#' | cut -d':' -f1 | sort -u) ) unset IFS text= @@ -24,12 +24,12 @@ for tag in "${tags[@]}"; do fi done if [ "$text" ]; then - latest=($(curl -sSL "$url" | grep "latest.*github.com" | sed -e 's!git://github.com/!!' -e 's/@/ /' -)) + latest=($(curl -fsSL "$url" | grep "latest.*github.com" | sed -e 's!git://github.com/!!' -e 's/@/ /' -)) if [ -z "latest" ]; then exit 0 # If not github or no latest tag, we are done here fi dockerfile='https://raw.githubusercontent.com/'"${latest[1]}"'/'"${latest[2]}"'/'"${latest[3]}"'/Dockerfile' - baseImage=$(curl -sSL $dockerfile | sed 's/:/\t/' | awk '$1 == "FROM" { print $2 }') + baseImage=$(curl -fsSL "$dockerfile" | awk -F '[:[:space:]]+' '$1 == "FROM" { print $2 }') # give a little space echo echo diff --git a/update.sh b/update.sh index 21d65bacb..ca63bccee 100755 --- a/update.sh +++ b/update.sh @@ -64,7 +64,7 @@ declare -A otherRepos=( [websphere-liberty]='https://github.com/WASdev/ci.docker' ) -dockerLatest="$(curl -sSL 'https://get.docker.com/latest')" +dockerLatest="$(curl -fsSL 'https://get.docker.com/latest')" for repo in "${repos[@]}"; do if [ -x "$repo/update.sh" ]; then