forked from autoiac-project/iac-eval
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·29 lines (22 loc) · 763 Bytes
/
setup.sh
File metadata and controls
executable file
·29 lines (22 loc) · 763 Bytes
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
set -Eeuo pipefail
# This is basically what `conda init` adds to bashrc
eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)"
# set -x
# Check if terraform is installed
if ! which terraform &> /dev/null; then
echo -e 'Make sure you have Terraform installed. Check README for how.' >&2
exit 1
fi
# Check if opa is installed
if ! which opa &> /dev/null; then
echo -e 'Make sure you have OPA installed. Check REAMD for how.' >&2
exit 1
fi
# Create the conda environment if it doesn't exist
if ! conda list --name iac-eval &> /dev/null; then
echo -e 'iac-eval conda environment not yet created. Creating the environment...'
conda env create -f environment.yml
fi
# Activate the conda environment
conda activate iac-eval