infra/roles/nextcloud/templates/nextcloudversion.sh.j2

15 lines
328 B
Django/Jinja

#!/bin/bash
# bite me
echo "{"
{% for item in nextclouds %}
phpversion="{{ item.root }}/html/version.php"
version=$(grep 'OC_Version =' $phpversion | awk '{ print $3 }' | tr -d "[a-z]();" | tr ',' '.')
comma="{% if not loop.last %},{%endif%}"
key="{{ item.name }}"
echo " \"$key\": \"$version\"$comma"
{% endfor %}
echo "}"