mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
consistency update: foamNew, foamNewSource, foamNewTemplate
- simplified the logic - provide direct link to the respective scripts - provide help from the respective scripts
This commit is contained in:
15
bin/foamNew
15
bin/foamNew
@ -33,7 +33,6 @@
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
usage: ${0##*/} <type> {args}
|
||||
|
||||
* create a new standard OpenFOAM source or template file
|
||||
@ -44,22 +43,18 @@ USAGE
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ "$#" -lt 2 ]
|
||||
then
|
||||
usage "wrong number of arguments, expected 2 (or more)"
|
||||
fi
|
||||
|
||||
# this implicitly covers a lone -help, but let other scripts handle the rest
|
||||
[ "$#" -gt 1 ] || usage
|
||||
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
source)
|
||||
shift
|
||||
$WM_PROJECT_DIR/bin/foamTemplates/source/newSource $*
|
||||
$WM_PROJECT_DIR/bin/templates/source/foamNewSource $*
|
||||
;;
|
||||
template)
|
||||
shift
|
||||
$WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/newSourceTemplate $*
|
||||
$WM_PROJECT_DIR/bin/templates/sourceTemplate/foamNewTemplate $*
|
||||
;;
|
||||
*)
|
||||
usage "unknown type"
|
||||
|
||||
Reference in New Issue
Block a user