-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap
30 lines (28 loc) · 972 Bytes
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
echo "This script must be sourced. Try \". ${BASH_SOURCE[0]}\"" 1>&2
exit 1
else
# Ensure Ansible is installed.
make ansible
# Bootstrap local Ansible install.
. .mk/.local/src/ansible/ansible-latest/hacking/env-setup 2>&1 > /dev/null
# Bootstrap Drumkit.
. .mk/drumkit
# Set the Linode API key.
if [[ -f linode.api.key ]]; then
export LINODE_API_KEY=$(cat linode.api.key)
else
echo "No 'linode.api.key' file found. LINODE_API_KEY must be set by another method." 1>&2
fi
if [[ -f aws.access.key ]]; then
export AWS_ACCESS_KEY_ID=$(cat aws.access.key)
else
echo "No 'aws.access.key' file found. AWS_ACCESS_KEY_ID must be set by another method." 1>&2
fi
if [[ -f aws.access.secret ]]; then
export AWS_SECRET_ACCESS_KEY=$(cat aws.access.secret)
else
echo "No 'aws.access.secret' file found. AWS_SECRET_ACCESS_KEY must be set by another method." 1>&2
fi
fi