mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-12-28 03:37:59 +00:00
bin/ wmake/ script updates
- send error messages to stderr - added -h/-help options where some were missing - changed 3-space to 4-space indentation - where possible, allow multiple directories from the command-line
This commit is contained in:
25
bin/foamNew
25
bin/foamNew
@ -36,7 +36,7 @@ usage() {
|
||||
|
||||
usage: ${0##*/} <type> {args}
|
||||
|
||||
* create a new standard OpenFOAM source file
|
||||
* create a new standard OpenFOAM source or template file
|
||||
|
||||
type: (source|template)
|
||||
|
||||
@ -46,25 +46,24 @@ USAGE
|
||||
|
||||
if [ "$#" -lt 2 ]
|
||||
then
|
||||
usage "wrong number of arguments, expected 2 (or more)"
|
||||
usage "wrong number of arguments, expected 2 (or more)"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
-h | -help)
|
||||
usage
|
||||
;;
|
||||
usage
|
||||
;;
|
||||
source)
|
||||
shift
|
||||
$WM_PROJECT_DIR/bin/foamTemplates/source/newSource $*
|
||||
;;
|
||||
shift
|
||||
$WM_PROJECT_DIR/bin/foamTemplates/source/newSource $*
|
||||
;;
|
||||
template)
|
||||
shift
|
||||
$WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/newSourceTemplate $*
|
||||
;;
|
||||
shift
|
||||
$WM_PROJECT_DIR/bin/foamTemplates/sourceTemplate/newSourceTemplate $*
|
||||
;;
|
||||
*)
|
||||
usage "unknown type"
|
||||
;;
|
||||
usage "unknown type"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user