mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
CONFIG: support optional config.sh/readline file
- provides a hook for specifying alternative locations
This commit is contained in:
@ -16,8 +16,11 @@
|
|||||||
# Description
|
# Description
|
||||||
# Detection/setup of READLINE
|
# Detection/setup of READLINE
|
||||||
#
|
#
|
||||||
# Requires
|
# Optional
|
||||||
# None
|
# config.sh/readline
|
||||||
|
#
|
||||||
|
# Environment
|
||||||
|
# READLINE_ARCH_PATH
|
||||||
#
|
#
|
||||||
# Functions provided
|
# Functions provided
|
||||||
# have_readline, no_readline, echo_readline, search_readline
|
# have_readline, no_readline, echo_readline, search_readline
|
||||||
@ -27,6 +30,8 @@
|
|||||||
# READLINE_INC_DIR
|
# READLINE_INC_DIR
|
||||||
# READLINE_LIB_DIR
|
# READLINE_LIB_DIR
|
||||||
#
|
#
|
||||||
|
# Without a config file, defaults to system
|
||||||
|
#
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/sysFunctions # General system functions
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/sysFunctions # General system functions
|
||||||
|
|
||||||
@ -108,7 +113,16 @@ search_readline()
|
|||||||
# Output as per search_* function
|
# Output as per search_* function
|
||||||
have_readline()
|
have_readline()
|
||||||
{
|
{
|
||||||
search_readline system
|
local config="config.sh/readline"
|
||||||
|
local file
|
||||||
|
|
||||||
|
# Allow missing file
|
||||||
|
if file="$("$WM_PROJECT_DIR"/bin/foamEtcFile "$config")"
|
||||||
|
then
|
||||||
|
. "$file"
|
||||||
|
fi
|
||||||
|
|
||||||
|
search_readline "$READLINE_ARCH_PATH"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user