CONFIG: bin/tools/query-versions

- Query the etc/config.sh values for ThirdParty software.
  Usable without an active OpenFOAM environment.
This commit is contained in:
Mark Olesen
2020-02-07 16:28:53 +01:00
parent 739bc3c4af
commit 553c01d52e
16 changed files with 516 additions and 141 deletions

View File

@ -8,8 +8,7 @@
# Copyright (C) 2018-2019 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Script
# sysFunctions
@ -91,6 +90,26 @@ then
}
# Simple output for -query
# $1 = software
# $2 = setting
_process_query()
{
if isNone "$2"
then
echo "$1=none"
elif isAbsdir "$2" ## not hasAbsdir
then
echo "$1=${2##*/}"
elif isSystem "$2"
then
echo "$1=system"
else
echo "$1=unknown"
fi
}
# Return system prefix (/usr, /usr/local, ...) based on hint provided
# Eg,
# sysPrefix "/usr/local/include/fftw3.h" -> "/usr/local"