Skip to content

Commit

Permalink
Chef version manifest for Bourne Shell
Browse files Browse the repository at this point in the history
We also need to check the a version of 12.5.0-current.0+20150721082808.git.14.c91b337-1
matches 12.5.0-current.0+20150721082808.git.14.c91b337
  • Loading branch information
jaym committed Jul 27, 2015
1 parent 0e36116 commit 5ec0a20
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions support/chef_base_install_command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,22 @@ should_update_chef() {
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
}

Expand Down

0 comments on commit 5ec0a20

Please sign in to comment.