etc/bashrc: removed sourcing of additional files passed as

arguments to the original sourced file. Caused an infinite loop if original source command
is called within a function, e.g.

sourceFile() {
    . $1
}
This commit is contained in:
Chris Greenshields
2021-09-07 17:10:13 +01:00
parent 19950fa3b8
commit 8830b2fa1e
3 changed files with 9 additions and 22 deletions

View File

@ -48,7 +48,7 @@ then
}
# Evaluate command-line parameters
_foamEval()
_foamParams()
{
while [ $# -gt 0 ]
do
@ -67,15 +67,6 @@ then
[ "$FOAM_VERBOSE" -a "$PS1" ] && echo "export $1" 1>&2
eval "export $1"
;;
*)
# Filename: source it
if [ -f "$1" ]
then
_foamSource "$1"
else
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"`
fi
;;
esac
shift
done
@ -117,6 +108,6 @@ else
# ~~~~~~~~~~~~~~~~~~~~
unset WM_BASH_FUNCTIONS
unset _foamAddPath _foamAddLib _foamAddMan
unset _foamSource _foamEval
unset _foamSource _foamParams
fi