OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   05-Aug-2007 14:01:53
  Branch: HEAD                             Handle: 2007080513015001

  Modified files:
    openpkg-src/dbmail      dbmail-setup.sh dbmail.spec

  Log:
    allow one to override the database storage location

  Summary:
    Revision    Changes     Path
    1.5         +14 -1      openpkg-src/dbmail/dbmail-setup.sh
    1.20        +1  -1      openpkg-src/dbmail/dbmail.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/dbmail/dbmail-setup.sh
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 dbmail-setup.sh
  --- openpkg-src/dbmail/dbmail-setup.sh        4 Aug 2007 19:32:04 -0000       
1.4
  +++ openpkg-src/dbmail/dbmail-setup.sh        5 Aug 2007 12:01:50 -0000       
1.5
  @@ -3,6 +3,14 @@
   ##  dbmail-setup.sh -- DBMail RDBMS Setup Utility
   ##
   
  +#   command line argument sanity check
  +if [ $# -eq 0 ]; then
  +    echo "$0:ERROR: invalid command line" 1>&2
  +    echo "$0:USAGE: $0 install [<database-directory>]" 1>&2
  +    echo "$0:USAGE: $0 uninstall" 1>&2
  +    exit 1
  +fi
  +
   #   package configuration
   db_type="@db_type@"
   db_script="@l_prefix@/share/dbmail/dbmail-setup.sql"
  @@ -29,10 +37,15 @@
   fi
   
   #   dispatch operation
  -cmd="${1:-"install"}"
  +cmd="$1"
  +shift
   case "$cmd" in
       install )
           #   create the DBMail database
  +        if [ $# -gt 0 ]; then
  +            db_dir="$1"
  +            shift
  +        fi
           if [ ".$db_type" = .sqlite ]; then
               ( umask 077
                 @l_prefix@/bin/sqlite3 $db_name <$db_script
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/dbmail/dbmail.spec
  ============================================================================
  $ cvs diff -u -r1.19 -r1.20 dbmail.spec
  --- openpkg-src/dbmail/dbmail.spec    4 Aug 2007 19:32:04 -0000       1.19
  +++ openpkg-src/dbmail/dbmail.spec    5 Aug 2007 12:01:51 -0000       1.20
  @@ -38,7 +38,7 @@
   Group:        Mail
   License:      GPL
   Version:      %{V_major}.%{V_minor}%{V_micro}
  -Release:      20070804
  +Release:      20070805
   
   #   package options
   %option       with_fsl    yes
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to