From 5ca971a18a708341dd49f27c23fec40ea4342d13 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 16 Dec 1999 20:10:02 +0000 Subject: 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 http://home.zf.jcu.cz/~zakkr/ --- src/bin/scripts/createdb | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'src/bin/scripts/createdb') 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 -- cgit v1.2.3