sonic-buildimage/platform/checkout/template.j2

12 lines
381 B
Plaintext
Raw Normal View History

{% set path = env('PLATFORM_PATH') %}
if [ ! -d {{ path }} ]; then git clone {{ module.repo }} {{ path }}; fi;
if [ -d {{ path }}/.git ]; then cd {{ path }} &&
{% if module.ref is defined %}
git checkout {{ module.ref }} && git submodule update --init --recursive;
{% else %}
git submodule update --init --recursive;
{% endif %}
else echo "{{ path }}/.git not found"; exit 1; fi