chef-lctp/script/upgrade_chef.sh

9 lines
262 B
Bash

gem=/opt/chef/embedded/bin/gem
chef=/opt/chef/bin/chef-client
if [ "`$chef -v | awk '{print $NF}'`" != "$1" ]; then
echo "Upgrading Chef to $1...";
$gem uninstall chef --all --ignore-dependencies --executables
$gem install chef -v $1 --no-rdoc --no-ri
fi