mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
etc/config.sh/aliases: Use 'declare' instead of 'type' for bash/zsh compatibility
Resolves bug-report http://bugs.openfoam.org/view.php?id=2333
This commit is contained in:
@ -70,7 +70,13 @@ alias run='cd $FOAM_RUN'
|
||||
# Refresh the environment
|
||||
# ~~~~~~~~~~~~~~~~~~~~~~~
|
||||
# For backward-compatibility unalias wmRefresh if it is defined as an alias
|
||||
[ "$(type -t wmRefresh)" = "alias" ] && unalias wmRefresh || unset wmRefresh
|
||||
if declare -f wmRefresh > /dev/null
|
||||
then
|
||||
unset wmRefresh
|
||||
else
|
||||
unalias wmRefresh 2> /dev/null
|
||||
fi
|
||||
|
||||
wmRefresh()
|
||||
{
|
||||
wmProjectDir=$WM_PROJECT_DIR
|
||||
|
||||
Reference in New Issue
Block a user