STYLE: adjust looping parameter for _foamEval

This commit is contained in:
Mark Olesen
2018-11-29 12:45:45 +01:00
parent 628b2445fc
commit d45d7ca8c3

View File

@ -159,9 +159,9 @@ then
unset -f _foamEval 2>/dev/null unset -f _foamEval 2>/dev/null
_foamEval() _foamEval()
{ {
while [ $# -gt 0 ] for i
do do
case "$1" in case "$i" in
-*) -*)
# Stray option (not meant for us here) -> get out # Stray option (not meant for us here) -> get out
break break
@ -175,22 +175,21 @@ then
*=*) *=*)
# name=value -> export name=value # name=value -> export name=value
[ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] \ [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] \
&& echo "export $1" 1>&2 && echo "export $i" 1>&2
eval "export $1" eval "export $i"
;; ;;
*) *)
# Filename: source it # Filename: source it
if [ -f "$1" ] if [ -f "$i" ]
then then
[ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] \ [ -n "$FOAM_VERBOSE" ] && [ -n "$PS1" ] \
&& echo "Using: $1" 1>&2 && echo "Using: $i" 1>&2
. "$1" . "$i"
else else
_foamEtc -silent "$1" _foamEtc -silent "$i"
fi fi
;; ;;
esac esac
shift
done done
} }