Skip to content

Commit

Permalink
improve aws cli check
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn Woodford committed May 4, 2017
1 parent 1b74ce1 commit 94d4eb7
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion ec2-create-snapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
echo "AWS config not found or CLI not installed. Please run \"aws configure\"."
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ec2-delete-snapshots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
echo "AWS config not found or CLI not installed. Please run \"aws configure\"."
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ec2-elb-export-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ DEBUGMODE="0"
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
tput setaf 1; echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"." && tput sgr0
tput setaf 1; echo "AWS config not found or CLI not installed. Please run \"aws configure\"." && tput sgr0
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ec2-elb-upload-ssl-cert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function import(){
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ec2-import-network-acl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
echo "AWS config not found or CLI not installed. Please run \"aws configure\"."
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ec2-import-vpcsg-rules-cloudflare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fi
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ec2-import-vpcsg-rules-cloudfront.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fi
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ec2-import-vpcsg-rules-pingdom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ fi
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion ec2-import-vpcsg-rules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fi
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
tput setaf 1; echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"." && tput sgr0
tput setaf 1; echo "AWS config not found or CLI not installed. Please run \"aws configure\"." && tput sgr0
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ec2-import-waf-ip-set.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ DEBUGMODE="0"
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
tput setaf 1; echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"." && tput sgr0
tput setaf 1; echo "AWS config not found or CLI not installed. Please run \"aws configure\"." && tput sgr0
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion ec2-update-vpcsg-rules-pingdom.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ function HorizontalRule(){
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
Fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
Fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion elastic-beanstalk-update-hostnames.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function pause(){
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion route53-export-zones.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function pause(){
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion s3-create-iam-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
echo "AWS config not found or CLI not installed. Please run \"aws configure\"."
exit 1
fi
fi
Expand Down
2 changes: 1 addition & 1 deletion s3-fix-content-type-metadata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function pause(){
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/credentials; then
if ! grep -q aws_access_key_id ~/.aws/config; then
fail "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
fail "AWS config not found or CLI not installed. Please run \"aws configure\"."
fi
fi

Expand Down
2 changes: 1 addition & 1 deletion s3-setup-buckets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html
if ! grep -q aws_access_key_id ~/.aws/config; then
if ! grep -q aws_access_key_id ~/.aws/credentials; then
echo "Error: AWS config not found or CLI not installed. Please run \"aws configure\"."
echo "AWS config not found or CLI not installed. Please run \"aws configure\"."
exit 1
fi
fi
Expand Down

0 comments on commit 94d4eb7

Please sign in to comment.