[Dbconfig-common-devel] dbconfig-common dbconfig-generate-include.1,NONE,1.1 dbconfig-generate-include,1.4,1.5
seanius@haydn.debian.org
seanius@haydn.debian.org
Update of /cvsroot/dbconfig-common/dbconfig-common
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv31292
Modified Files:
dbconfig-generate-include
Added Files:
dbconfig-generate-include.1
Log Message:
manpage, and TODO updates
--- NEW FILE: dbconfig-generate-include.1 ---
.TH dbconfig-generate-include "1" "March 2005" "sean finney " "dbconfig-common"
.SH NAME
dbconfig-generate-include \- generate custom format db include files
.SH SYNOPSIS
.B dbconfig\-generate\-include [-hv] [-f format] [\-a] [\-d [varname]] [\-u [varname]] [\-p [varname]] [\-t [varname]] [\-O owner[:group]] [\-M perms] [\-U] infile [outfile]
.br
.Xc
.SH DESCRIPTION
.B dbconfig\-generate\-include
is a program to generate custom format include files containing the
information necessary to connect a program to a database resource.
.SH OPTIONS
.TP
infile
use the given dbconfig\-common config file as input
.TP
outfile
use the given file as input (default: stdout)
.TP
\fB\-f\fR|\-\-format
use the given output format (default: sh)
.TP
\fB\-a\fR|\-\-all
include all information in output (default)
.TP
\fB\-d\fR|\-\-dbname
include the dbname in the output
.TP
\fB\-p\fR|\-\-dbpass
include the dbpass in the output
.TP
\fB\-s\fR|\-\-dbserver
include the dbserver and dbport in the output
.TP
\fB\-u\fR|\-\-dbuser
include the dbuser in the output
.TP
\fB\-t\fR|\-\-dbtype
include the dbtype in the output
.TP
\fB\-O\fR|\-\-owner
set the owner:group of the output file
.TP
\fB\-M\fR|\-\-mask
set the permissions on the output file
.TP
\fB\-U\fR|\-\-ucf
register the outputfile with ucf
.TP
\fB\-h\fR|\-\-help
display this helpful message
.TP
\fB\-v\fR|\-\-version
output the version and exit
.PP
format is one of a list of include\-file style formats for various
programming languages. the current list includes:
.TP
sh
/bin/sh style include file
.TP
perl
perl parseable include file
.TP
php
php parseable include file
.TP
cpp
c\-style header file, using #define'd constants
Index: dbconfig-generate-include
===================================================================
RCS file: /cvsroot/dbconfig-common/dbconfig-common/dbconfig-generate-include,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- dbconfig-generate-include 25 Feb 2005 05:57:03 -0000 1.4
+++ dbconfig-generate-include 14 Mar 2005 06:26:38 -0000 1.5
@@ -8,13 +8,22 @@
dbserver_varname="dbserver"
dbtype_varname="dbtype"
-usage(){
+VERSION="1.5"
+
+version(){
prog=`basename $0`
cat << EOF
-$prog - copyright (c) 2005 sean finney <seanius@debian.org>
+$prog v$VERSION
+copyright (c) 2005 sean finney <seanius@debian.org>
-usage: $prog [-h] [-f format] [-a] [-d [varname]] [-u [varname]] [-p [varname]] [-t [varname]] [-O owner[:group]] [-M perms] [-U] infile [outfile]
+EOF
+}
+
+usage(){
+ version
+ cat << EOF
+usage: $prog [-hv] [-f format] [-a] [-d [varname]] [-u [varname]] [-p [varname]] [-t [varname]] [-O owner[:group]] [-M perms] [-U] infile [outfile]
infile use the given dbconfig-common config file as input
outfile use the given file as input (default: stdout)
@@ -28,6 +37,8 @@
-O|--owner set the owner:group of the output file
-M|--mask set the permissions on the output file
-U|--ucf register the outputfile with ucf
+ -h|--help display this helpful message
+ -v|--version output the version and exit
format is one of a list of include-file style formats for various
programming languages. the current list includes:
@@ -39,7 +50,7 @@
EOF
}
-TEMP=`getopt -o af:hd::p::u::s::t::O:M:U --long help,dbuser::,dbpass::,dbport::,dbserver::,dbtype::,output:,format:,owner:,mask:,ucf -n $0 -- "$@"`
+TEMP=`getopt -o af:hd::p::u::s::t::O:M:Uv --long help,dbuser::,dbpass::,dbport::,dbserver::,dbtype::,output:,format:,owner:,mask:,ucf,version -n $0 -- "$@"`
if [ $? != 0 ] ; then usage >&2 ; exit 1 ; fi
@@ -105,6 +116,10 @@
;;
-h|--help)
usage
+ exit
+ ;;
+ -v|--version)
+ version
exit
;;
-U|--ucf)