tazbug view tazbug @ rev 151

Fix in users plugin (from tinycm)
author Christophe Lincoln <pankso@slitaz.org>
date Tue Feb 28 22:59:52 2017 +0100 (2017-02-28)
parents 3d8bf273e46e
children
line source
1 #!/bin/sh
2 #
3 # TazBug Command line tool. Help to search and check bugs from cmdline.
4 # This tool uses data from Tazbug 'textmode' plugin.
5 #
6 # Copyright (C) 2017 SliTaz GNU/Linux - BSD License
7 #
8 . /lib/libtaz.sh
10 #url="http://localhost/~pankso/cgi-bin/tazbug/web/bugs.cgi?textmode"
11 url="http://bugs.slitaz.org/bugs.cgi?textmode"
13 help() {
14 cat << EOT
16 $(boldify $(gettext "Usage:")) tazbug [stats|search|ID] [pattern]
18 $(boldify $(gettext "Examples:"))
19 tazbug 120
20 tazbug search firefox
22 EOT
23 }
25 # Usage: get "data=xxx"
26 get() {
27 busybox wget -q "${url}&${1}" -O -
28 }
30 #
31 # Commands
32 #
34 case "$1" in
35 stats)
36 newline
37 get "stats"
38 newline ;;
39 search)
40 newline
41 echo "$(boldify $(gettext 'Searching for:')) $(colorize 33 $2)"
42 separator
43 get "search=$2"
44 newline ;;
45 *[0-9]*)
46 newline
47 boldify "Bug info"
48 separator
49 get "id=$1"
50 separator && newline ;;
51 *)
52 help ;;
53 esac
55 rm -f ${tmp} && exit 0