Permalink
Please sign in to comment.
| @@ -0,0 +1,41 @@ | ||
| + | ||
| +#!/bin/bash | ||
| + | ||
| +# Copyright 2015 The Kubernetes Authors. | ||
| +# | ||
| +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| +# you may not use this file except in compliance with the License. | ||
| +# You may obtain a copy of the License at | ||
| +# | ||
| +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| +# | ||
| +# Unless required by applicable law or agreed to in writing, software | ||
| +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| +# See the License for the specific language governing permissions and | ||
| +# limitations under the License. | ||
| + | ||
| + | ||
| +set -o errexit | ||
| +set -o nounset | ||
| +set -o pipefail | ||
| + | ||
| +function package_status() { | ||
| + local pkgname=$1 | ||
| + brew info ${pkgname} | grep "Not installed" > /dev/null | ||
| + if [[ $? -eq 0 ]]; then | ||
| + echo "Missing package ${pkgname}" | ||
| + brew install ${pkgname} | ||
| + fi | ||
| +} | ||
| + | ||
| +function gather_installation_reqs() { | ||
| + brew > /dev/null | ||
| + if [[ $? -ne 0 ]]; then | ||
| + echo "Missing brew installer" | ||
| + /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | ||
| + fi | ||
| + | ||
| + package_status 'juju' | ||
| + package_status 'charm-tools' | ||
| +} |
0 comments on commit
fdec5d1