Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Scripts: changed $* to "$@" to correctly handle the passing of argume…

…nts to other scripts
  • Loading branch information...
commit 949ec0dcff28d2e0f44aa62a28f3e328d65bffad 1 parent da99d11
Henry authored
Showing with 6 additions and 6 deletions.
  1. +2 −2 bin/foamNew
  2. +4 −4 bin/tools/RunFunctions
View
4 bin/foamNew
@@ -52,11 +52,11 @@ USAGE
case "$1" in
(-s | -source | source)
shift
- $WM_PROJECT_DIR/etc/codeTemplates/source/foamNewSource $*
+ $WM_PROJECT_DIR/etc/codeTemplates/source/foamNewSource "$@"
;;
(-t | -template | template)
shift
- $WM_PROJECT_DIR/etc/codeTemplates/template/foamNewTemplate $*
+ $WM_PROJECT_DIR/etc/codeTemplates/template/foamNewTemplate "$@"
;;
(*)
usage "unknown type '$1'"
View
8 bin/tools/RunFunctions
@@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration |
-# \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
+# \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@@ -44,7 +44,7 @@ runApplication()
echo "$APP_NAME already run on $PWD: remove log file to re-run"
else
echo "Running $APP_RUN on $PWD"
- $APP_RUN $* > log.$APP_NAME 2>&1
+ $APP_RUN "$@" > log.$APP_NAME 2>&1
fi
}
@@ -65,9 +65,9 @@ runParallel()
#if [ "$WM_SCHEDULER" ]
#then
# echo "$PWD: $WM_SCHEDULER -np $nProcs" 1>&2
- # $WM_SCHEDULER -np $nProcs "( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )"
+ # $WM_SCHEDULER -np $nProcs "( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null > log.$APP_NAME 2>&1 )"
#else
- ( mpirun -np $nProcs $APP_RUN -parallel $* < /dev/null > log.$APP_NAME 2>&1 )
+ ( mpirun -np $nProcs $APP_RUN -parallel "$@" < /dev/null > log.$APP_NAME 2>&1 )
#fi
fi
}
Please sign in to comment.
Something went wrong with that request. Please try again.