support/install_command.sh in mixlib-install-0.3.0 vs support/install_command.sh in mixlib-install-0.4.0

- old
+ new

@@ -170,16 +170,25 @@ return 1; elif test "$2" = "latest"; then return 0; fi - chef_version="`${1}/bin/chef-solo -v | cut -d \" \" -f 2`"; + if test -f "${1}/version-manifest.txt"; then + chef_version="`head -n 1 ${1}/version-manifest.txt | cut -d \" \" -f 2`"; + else + chef_version="`${1}/bin/chef-solo -v | cut -d \" \" -f 2`"; + fi echo "$chef_version" | grep "^${2}" 2>&1 >/dev/null; if test $? -eq 0; then return 1; else - return 0; + echo "${2}" | grep "^$chef_version" 2>&1 >/dev/null; + if test $? -eq 0; then + return 1; + else + return 0; + fi fi } # unable_to_download URL FILE unable_to_download() {