File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # check for git
4+ if ! which git > /dev/null; then
5+ echo ' Please install git and ensure it is in your $PATH.'
6+ exit
7+ fi
8+
9+ # check for RubyGems and friends
10+ if ! which ruby > /dev/null; then
11+ echo ' Please install ruby and ensure it is in your $PATH.'
12+ exit
13+ fi
14+ if ! which gem > /dev/null; then
15+ echo ' Please install RubyGems and ensure "gem" is in your $PATH.'
16+ exit
17+ fi
18+ if ! which bundle > /dev/null; then
19+ echo ' Please install the bundler ruby gem and ensure "bundle" is in your $PATH.'
20+ exit
21+ fi
22+ bundles=` bundle list | egrep ' berkshelf|chef|foodcritic|knife-' | wc -l`
23+ if ! [ $bundles -ge 4 ]; then
24+ echo ' Please run "bundle install" for required ruby gems.'
25+ exit
26+ fi
27+
28+ # check for working knife
29+ if ! which knife > /dev/null; then
30+ echo ' Please install a knife-<provider> ruby gem and ensure "knife" is in your $PATH.'
31+ exit
32+ fi
33+ if ! knife client list > /dev/null; then
34+ echo ' Please ensure the knife.rb file is set up correctly for your Chef account.'
35+ exit
36+ fi
Original file line number Diff line number Diff line change @@ -5,6 +5,20 @@ if [ -z $1 ]; then
55 exit 1
66fi
77
8+ # check for Deis' general dependencies
9+ thisdir=` dirname $0 `
10+ $thisdir /check-deis-deps.sh
11+
12+ # check for EC2 API tools in $PATH
13+ if ! which ec2-describe-group > /dev/null; then
14+ echo ' Please install the EC2 API command-line tools and ensure they are in your $PATH.'
15+ exit
16+ fi
17+
18+ # check for AWS environment variables
19+ : ${AWS_ACCESS_KEY:? ' Please set AWS_ACCESS_KEY in your environment for EC2 API access.' }
20+ : ${AWS_SECRET_KEY:? ' Please set AWS_SECRET_KEY in your environment for EC2 API access.' }
21+
822region=$1
923
1024# see contrib/prepare-ubuntu-ami.sh for instructions
You can’t perform that action at this time.
0 commit comments