-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcompile.sh
executable file
·43 lines (28 loc) · 1.04 KB
/
compile.sh
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
set -euo pipefail
# Compile a (partial/full) configuration for a target machine.
# Source code is machine.yaml + compile flags (options, which targets, etc.)
# Produces a script which serves as some sort of intermediate representation (IR).
pushd "$(dirname $0)" > /dev/null
. ./config.sh
popd > /dev/null
export MACHINES_FILE=$1
export MACHINE_NAME=$2
ensure_exists ".machines.\"${MACHINE_NAME}\""
echo "#!/bin/bash"
echo "set -eu"
$(dirname $0)/emitters/common_tools.sh
$(dirname $0)/emitters/hostname.sh
$(dirname $0)/emitters/system_packages.sh
$(dirname $0)/emitters/system_files.sh
$(dirname $0)/emitters/swap.sh
$(dirname $0)/emitters/ssh_authorized_keys.sh
$(dirname $0)/emitters/volumes.sh
$(dirname $0)/emitters/networking.sh
$(dirname $0)/emitters/ensure_docker_running.sh
$(dirname $0)/emitters/ssh_password_authentication.sh
$(dirname $0)/emitters/fail2ban.sh
$(dirname $0)/emitters/updatedb.sh
$(dirname $0)/emitters/monitoring.sh
$(dirname $0)/emitters/service_accounts.sh
$(dirname $0)/emitters/application_server_role.sh