create_summary_websites.sh: support multisite drupal.

This commit is contained in:
Christoph 2020-08-21 14:01:14 +02:00
parent 78da12c4da
commit 2e790b5bf4

View File

@ -628,6 +628,14 @@ for _vhost_file in ${_all_vhost_files_arr[@]} ; do
| awk -F ')' '{print$1}' \
| tail -1 )"
elif [[ -f "${_documentroot}/core/lib/Drupal.php" ]] ; then
version_search_string="const\\s+VERSION\\s+="
cms_version="$(grep -i -E "^\s*$version_search_string" "${_documentroot}/core/lib/Drupal.php" 2> /dev/null \
| awk -F ' ' '{print$4}' \
| tail -1 )"
fi
if [[ -n "$cms_version" ]] ; then
# - Remove leading whitespace characters
cms_version="${cms_version#"${cms_version%%[![:space:]]*}"}"
# - Remove trailing whitespace characters