Debian Codegraph @

tests/image_prep/roles/bootstrap/templates/bootstrap.sh.j2

raw
1 set -o errexit
2 set -o nounset
3
4 {% for item in package_manager_repos %}
5 cat << "EOF" > "{{ item.dest }}"
6 {{ item.content }}
7 EOF
8 {% endfor %}
9
10 {% if bootstrap_packages %}
11 if command -v apt-get; then
12 apt-get -y update
13 apt-get -y --no-install-recommends install {{ bootstrap_packages | join(' ') }}
14 elif command -v dnf; then
15 dnf -y install {{ bootstrap_packages | join(' ') }}
16 elif command -v yum; then
17 yum -y install {{ bootstrap_packages | join(' ') }}
18 else
19 exit 42
20 fi
21 {% endif %}