Bugzilla – Attachment 24090 Details for
Bug 11509
koha-create should print better usage information
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11509: koha-create should print better usage information
Bug-11509-koha-create-should-print-better-usage-in.patch (text/plain), 5.00 KB, created by
Tomás Cohen Arazi (tcohen)
on 2014-01-09 14:13:58 UTC
(
hide
)
Description:
Bug 11509: koha-create should print better usage information
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2014-01-09 14:13:58 UTC
Size:
5.00 KB
patch
obsolete
>From 2480c74d585a767fec31a57c40fd4d84fe813400 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@gmail.com> >Date: Thu, 9 Jan 2014 10:56:56 -0300 >Subject: [PATCH] Bug 11509: koha-create should print better usage information > >This patch makes koha-create print better and more descriptive usage >information. Also adds the --help and -h switches. > >Regards >To+ > >Sponsored-by: Universidad Nacional de Cordoba >--- > debian/scripts/koha-create | 67 +++++++++++++++++++++++++++++++++++----------- > 1 file changed, 51 insertions(+), 16 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 7f05eb0..c0eecd2 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -19,15 +19,49 @@ > > set -e > >-usage="Usage: $0 [--create-db|--request-db|--populate-db|--use-db] \ >- [--marcflavor marc21|normarc|unimarc] \ >- [--zebralang en|es|fr|nb|ru|uk] \ >- [--auth-idx dom|grs1] [--biblio-idx dom|grs1] \ >- [--use-memcached] \ >- [--memcached-servers server:port] [--memcached-prefix prefix] \ >- [--defaultsql /path/to/some.sql] \ >- [--configfile /path/to/config] [--passwdfile /path/to/passwd] \ >- [--database database] [--adminuser n] instancename" >+usage() >+{ >+ local scriptname=$0 >+ cat <<EOF >+ >+Creates new Koha instances. >+ >+Usage: >+ >+ $scriptname [db usage mode] [options] instancename" >+ >+DB usage mode: >+ --create-db Create a new database on localhost. (default). >+ --request-db Creates a instancename-db-request.txt file where >+ you adjust your DB settings and re-run with --populate-db. >+ --populate-db Finish the installation you started with --request-db after >+ you adjusted the instancename-db-request.txt file. >+ --use-db Use this option if you already created and populated you DB. >+ >+Options: >+ --marcflavor flavor Set the MARC flavor. Valid values are marc21 (default), >+ normarc and unimarc. >+ --zebralang lang Choose the primary language for Zebra indexing. Valid >+ values are en (default), es, fr, nb, ru and uk. >+ --auth-idx idx_mode Set the indexing mode for authority records. Valid >+ values are dom (default) and grs1. >+ --biblio-idx idx_mode Set the indexing mode for bibliographic records. >+ Valid values are dom (default) and grs1. >+ --use-memcached Set the instance to make use of memcache. >+ --memcached-servers str Set a comma-separated list of host:port memcached servers. >+ --memcached-prefix str Set the desired prefix for the instance memcached namespace. >+ --defaultsql some.sql Specify a default SQL file to be loaded on the DB. >+ --configfile cfg_file Specify an alternate config file for reading default values. >+ --passwdfile passwd Specify an alternate passwd file. >+ --database dbname Enforce the use of the specified DB name (64 char limit) >+ --adminuser n Explicit the admin user ID in the DB. Relevant in >+ conjunction with --defaultsql and --populate-db. >+ --help,-h Show this help. >+ >+Note: the instance name cannot be longer that 11 chars. >+ >+EOF >+} > > die() { > echo "$@" 1>&2 >@@ -220,9 +254,9 @@ then > . /etc/koha/koha-sites.conf > fi > >-[ $# -ge 2 ] && [ $# -le 16 ] || die $usage >+[ $# -ge 2 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) > >-TEMP=`getopt -o crpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \ >+TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:, \ > -n "$0" -- "$@"` > > # Note the quotes around `$TEMP': they are essential! >@@ -257,11 +291,11 @@ while true ; do > CLO_MEMCACHED_PREFIX="$2" ; shift 2;; > -m|--marcflavor) > CLO_ZEBRA_MARC_FORMAT="$2" ; shift 2 ;; >- -l|--zebralang) >+ -l|--zebralang) > CLO_ZEBRA_LANGUAGE="$2" ; shift 2 ;; >- --auth-idx) >+ --auth-idx) > CLO_AUTHORITIES_INDEXING_MODE="$2" ; shift 2 ;; >- --biblio-idx) >+ --biblio-idx) > CLO_BIBLIOS_INDEXING_MODE="$2" ; shift 2 ;; > -d|--defaultsql) > CLO_DEFAULTSQL="$2" ; shift 2 ;; >@@ -273,6 +307,8 @@ while true ; do > CLO_DATABASE="$2" ; shift 2 ;; > -a|--adminuser) > CLO_ADMINUSER="$2" ; shift 2 ;; >+ -h|--help) >+ usage ; exit 0 ;; > --) > shift ; break ;; > *) >@@ -341,8 +377,7 @@ Please set USE_MEMCACHED="yes" on /etc/koha/koha-sites.conf or use the > > EOF` > >- echo $usage >- die $MSG >+ usage ; die $MSG > else > # Unset memcached-related variables > MEMCACHED_SERVERS="" >-- >1.8.5.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 11509
:
24090
|
24098
|
24205
|
24239
|
24240
|
25173