Browse Source

Switch from using "[[:space:]]" to just using "[ \t]" (especially so that mawk is an acceptable awk implementation)

Tianon Gravi 10 years ago
parent
commit
1a10df7459
1 changed files with 2 additions and 2 deletions
  1. 2 2
      .template-helpers/variant.sh

+ 2 - 2
.template-helpers/variant.sh

@@ -33,11 +33,11 @@ if [ "$text" ]; 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 -fsSL "$dockerfile" | awk -F '[:[:space:]]+' '$1 == "FROM" { print $2 }')
+	baseImage=$(curl -fsSL "$dockerfile" | awk -F '[: \t]+' '$1 == "FROM" { print $2 }')
 	# give a little space
 	echo
 	echo
-	if [ "$baseImage" = "buildpack-deps" ]; then
+	if [ "$baseImage" = 'buildpack-deps' ]; then
 		f='variant-buildpacks.md'
 	else
 		f='variant.md'