X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=shell%2Fpacker-install.sh;h=a98ba9ac5d4f4066f2429b7c6e8e873443d3b2df;hb=refs%2Ftags%2Fv0.84.0;hp=86ddf82eea465ba3fd8bcd58f2e298da8127eae0;hpb=68df50265903964986984e073df5cf671998befc;p=releng%2Fglobal-jjb.git diff --git a/shell/packer-install.sh b/shell/packer-install.sh index 86ddf82e..a98ba9ac 100644 --- a/shell/packer-install.sh +++ b/shell/packer-install.sh @@ -38,11 +38,12 @@ version_ge() { test "$(echo "$@" | tr " " "\n" | sort -rV | head -n 1)" == "$1"; if hash packer.io 2>/dev/null; then CURRENT_VERSION="$(packer.io --version)" - if version_lt $CURRENT_VERSION $PACKER_VERSION; then - echo "Packer version $CURRENT_VERSION installed is less than $PACKER_VERSION available, updating Packer." - packer_install + if version_lt "$CURRENT_VERSION" "$PACKER_VERSION"; then + echo "Packer version $CURRENT_VERSION installed is less than $PACKER_VERSION available, updating Packer." + packer_install else - echo "Packer version installed $CURRENT_VERSION is greater than or equal to the required minimum version $PACKER_VERSION." + echo "Packer version installed $CURRENT_VERSION is greater than or equal to"\ + "the required minimum version $PACKER_VERSION." fi else echo "Packer binary not available, installing Packer version $PACKER_VERSION."