Merge "[dev_setup] Chef Installation Clean Up"

This commit is contained in:
Jesse Zhang 2012-03-29 18:26:09 +00:00 коммит произвёл Gerrit Code Review
Родитель 943643b83c 9d3f45176f
Коммит fb6fc2f4f5
1 изменённых файлов: 4 добавлений и 14 удалений

Просмотреть файл

@ -95,24 +95,14 @@ if [ $? == 0 ]; then
fi fi
fi fi
# Install chef if required. # Install chef
which chef-solo if ! (apt-cache policy | grep opscode); then
if [ $? != 0 ]; then
if [[ $ALL != true ]]; then
read -p "chef-solo is required, should I install it? [Y/n]"
if [[ $REPLY =~ ^[nN]$ ]]; then
exit 0
fi
fi
echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list echo "deb http://apt.opscode.com/ `lsb_release -cs`-0.10 main" | sudo tee /etc/apt/sources.list.d/opscode.list
wget -qO - http://apt.opscode.com/packages@opscode.com.gpg.key | sudo apt-key add - wget -qO - http://apt.opscode.com/packages@opscode.com.gpg.key | sudo apt-key add -
echo chef chef/chef_server_url select none | sudo /usr/bin/debconf-set-selections echo chef chef/chef_server_url select none | sudo /usr/bin/debconf-set-selections
run_cmd apt-get $APT_CONFIG update -qq
run_cmd apt-get $APT_CONFIG install -qym chef
else
run_cmd apt-get $APT_CONFIG update -qq
fi fi
run_cmd apt-get $APT_CONFIG update -qq
run_cmd apt-get $APT_CONFIG install -qym chef
run_cmd apt-get $APT_CONFIG install -qym git-core run_cmd apt-get $APT_CONFIG install -qym git-core
[ -d $CLOUDFOUNDRY_HOME ] || mkdir $CLOUDFOUNDRY_HOME [ -d $CLOUDFOUNDRY_HOME ] || mkdir $CLOUDFOUNDRY_HOME