Hiya! Is there a bug for this patch?
Please remember to update debian/docs/koha-list.xml so the manual page for the command stays in sync with the code. Best regards, Magnus Enger libriotech.no On 19 December 2011 12:16, Judit <[email protected]> wrote: > Add --disabled to koha-list command > --- > debian/scripts/koha-list | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/debian/scripts/koha-list b/debian/scripts/koha-list > index 1e19f1a..459e5ca 100755 > --- a/debian/scripts/koha-list > +++ b/debian/scripts/koha-list > @@ -34,9 +34,10 @@ help() { > Lists Koha instances, optionally only those that are enabled or have > email turned on. > > -Usage: $0 [--enabled] [--email] [-h] > +Usage: $0 [--enabled|--disabled] [--email|--noemail] [-h] > Options: > --enabled only show instances that are enabled > + --disabled only show instances that are disabled > --email only show instances that have email enabled > --noemail only show instances that do not have email enabled > -h this help > @@ -47,9 +48,10 @@ eoh > } > > enabled=no > +disabled=no > email=no > noemail=no > -args=$(getopt -l enabled,email,noemail -o h -n $0 -- "$@") > +args=$(getopt -l enabled,disabled,email,noemail -o h -n $0 -- "$@") > set -- $args > while [ ! -z "$1" ] > do > @@ -57,6 +59,7 @@ do > -h) help; exit;; > --email) email=yes;; > --enabled) enabled=yes;; > + --disabled) disabled=yes;; > --noemail) noemail=yes;; > *) break;; > esac > @@ -68,6 +71,7 @@ sort | > while read name > do > [ "$enabled" = yes ] && ! is_enabled "$name" && continue > + [ "$disabled" = yes ] && is_enabled "$name" && continue > [ "$email" = yes ] && [ ! -e /var/lib/koha/$name/email.enabled ] && > continue > [ "$noemail" = yes ] && [ -e /var/lib/koha/$name/email.enabled ] && > continue > echo "$name" > -- > 1.7.4.1 > > _______________________________________________ > Koha-patches mailing list > [email protected] > http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches > website : http://www.koha-community.org/ > git : http://git.koha-community.org/ > bugs : http://bugs.koha-community.org/ _______________________________________________ Koha-patches mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-patches website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
