STYLE: more consistent use of stderr for script usage
This commit is contained in:
parent
2873f9fc8d
commit
f691fe7896
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -30,6 +30,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -31,8 +31,9 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
|
||||
Usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2008-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2008-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -40,8 +40,9 @@ Script=${0##*/}
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
while [ "$#" -ge 1 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
|
||||
Usage: $Script srcDir dstDir
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -38,6 +38,7 @@
|
||||
Script=${0##*/}
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
Usage: $Script [OPTION] <pid>
|
||||
|
@ -39,6 +39,7 @@
|
||||
# foamEtcFile
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -29,6 +29,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -35,6 +35,7 @@ Script=${0##*/}
|
||||
toolsDir=${0%/*}/tools
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -30,6 +30,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
Usage: ${0##*/} <type> {args}
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2010-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2010-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -37,6 +37,7 @@ templateDir="appTemplates"
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -33,8 +33,9 @@ packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
toolsDir="${0%/*}/tools" # this script is located in the tools/ parent dir
|
||||
|
||||
usage() {
|
||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -gt 0 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
Usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
-o, -output <dir> specify alternative output directory
|
||||
|
@ -54,8 +54,9 @@ esac
|
||||
|
||||
|
||||
usage() {
|
||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -gt 0 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
Usage: ${0##*/} [OPTION] <archOptions>
|
||||
${0##*/} [OPTION] -current
|
||||
options:
|
||||
|
@ -52,8 +52,9 @@ esac
|
||||
|
||||
|
||||
usage() {
|
||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -gt 0 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
Usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
-b, -bzip2 use bzip2 instead of gzip compression
|
||||
|
@ -33,8 +33,9 @@ packDir=$WM_PROJECT-$WM_PROJECT_VERSION
|
||||
htmlDir=doc/Doxygen/html
|
||||
|
||||
usage() {
|
||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -gt 0 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
Usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
-b, -bzip2 use bzip2 instead of gzip compression
|
||||
|
@ -52,8 +52,9 @@ esac
|
||||
|
||||
|
||||
usage() {
|
||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -gt 0 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
Usage: ${0##*/} [OPTION] <archOptions>
|
||||
${0##*/} [OPTION] -current
|
||||
options:
|
||||
|
@ -33,8 +33,9 @@ packDir=ThirdParty-$WM_PROJECT_VERSION
|
||||
toolsDir="${0%/*}/tools" # this script is located in the tools/ parent dir
|
||||
|
||||
usage() {
|
||||
while [ $# -gt 0 ]; do echo "$1" 1>&2; shift; done
|
||||
cat <<USAGE 1>&2
|
||||
exec 1>&2
|
||||
while [ "$#" -gt 0 ]; do echo "$1"; shift; done
|
||||
cat <<USAGE
|
||||
Usage: ${0##*/} [OPTION]
|
||||
options:
|
||||
-o <dir> specify alternative output directory
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -33,6 +33,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -33,6 +33,7 @@
|
||||
# undefined behaviour
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -29,8 +29,9 @@
|
||||
# Remove all .dep files or remove .dep files referring to <file>
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE 1>&2
|
||||
cat<<USAGE
|
||||
Usage: ${0##*/} [file]
|
||||
|
||||
Remove all .dep files or remove .dep files referring to <file>
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -34,8 +34,9 @@
|
||||
# - optionally remove empty directories
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE 1>&2
|
||||
cat<<USAGE
|
||||
Usage: ${0##*/} [OPTION] [dir1 .. dirN]
|
||||
options:
|
||||
-rmdir find and remove empty directories (recursively)
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2004-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2004-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -30,6 +30,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration |
|
||||
# \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd.
|
||||
# \\ / A nd | Copyright (C) 2009-2011 OpenCFD Ltd.
|
||||
# \\/ M anipulation |
|
||||
#-------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -32,10 +32,11 @@
|
||||
Script=${0##*/}
|
||||
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
Usage: ${0##*/} [OPTIONS] file1 [.. fileN]
|
||||
Usage: $Script [OPTIONS] file1 [.. fileN]
|
||||
options:
|
||||
-html create html (default)
|
||||
-latex create LaTeX
|
||||
|
@ -29,6 +29,7 @@
|
||||
# touch all .dep files
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
# touch all .o files
|
||||
#------------------------------------------------------------------------------
|
||||
usage() {
|
||||
exec 1>&2
|
||||
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
|
||||
cat<<USAGE
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user