diff options
author | Bruce Momjian | 1999-12-16 20:10:02 +0000 |
---|---|---|
committer | Bruce Momjian | 1999-12-16 20:10:02 +0000 |
commit | 5ca971a18a708341dd49f27c23fec40ea4342d13 (patch) | |
tree | 2160d7c7e2922bca740fdefe2d0ad7ee9730245e /src/bin/scripts/createdb | |
parent | cf374febf5a06dfbf02f5d6d74f5d156cb9af62a (diff) |
Hi,
I sending promised patch with:
* getopt_long() - for pg_dump (portable)
* and "Usage: " changes in scripts in src/bin/
- this changes are cosmetic only, not change any
feature ...etc.
All PostgreSQL routines (scripts) support now long options and
help's output is alike for all scripts and all support -? or --help.
Karel
Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/
Diffstat (limited to 'src/bin/scripts/createdb')
-rw-r--r-- | src/bin/scripts/createdb | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/bin/scripts/createdb b/src/bin/scripts/createdb index 800d560cc03..14aad8b890e 100644 --- a/src/bin/scripts/createdb +++ b/src/bin/scripts/createdb @@ -11,7 +11,7 @@ # # # IDENTIFICATION -# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.3 1999/12/08 10:29:55 momjian Exp $ +# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createdb,v 1.4 1999/12/16 20:10:02 momjian Exp $ # #------------------------------------------------------------------------- @@ -28,7 +28,6 @@ do case "$1" in --help|-\?) usage=t - break ;; # options passed on to psql --host|-h) @@ -104,11 +103,21 @@ do shift done - if [ "$usage" ]; then - echo "Usage: $CMDNAME [-h server] [-p port] [-D path] \\" - echo " [-E encoding] [-U username] dbname [description]" - exit 0 + echo "" + echo "Usage: $CMDNAME [options] dbname [description]" + echo "" + echo " -h HOSTNAME, --host=HOSTNAME " + echo " -p PORT, --port=PORT " + echo " -U USERNAME, --username=USERNAME " + echo " -W, --password " + echo " -e, --echo " + echo " -q, --quiet " + echo " -D PATH, --location=PATH " + echo " -E ENCODING --encoding=ENCODING " + echo " -?, --help " + echo "" + exit 1 fi |