1 #!/bin/bash |
1 #!/bin/bash |
|
2 # (encoding: UTF-8) |
|
3 # |
|
4 # Simple Bug / ToDo tracker for the command line. |
|
5 # (Instructions below the license) |
|
6 # LICENSE |
|
7 # Copyright (C) 2006 LluĂs Batlle i Rossell |
|
8 # |
|
9 # This program is free software; you can redistribute it and/or |
|
10 # modify it under the terms of the GNU General Public License |
|
11 # as published by the Free Software Foundation; either version 2 |
|
12 # of the License, or (at your option) any later version. |
|
13 # |
|
14 # This program is distributed in the hope that it will be useful, |
|
15 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
17 # GNU General Public License for more details. |
|
18 # |
|
19 # You should have received a copy of the GNU General Public License |
|
20 # along with this program; if not, write to the Free Software |
|
21 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
22 # |
|
23 # Instructions: |
|
24 # 1. Your $BUG_PROJECT should point to a file. It will be the database you'll |
|
25 # be using. Use an absolute path. It may be, for instance, "~/todo.bug" |
|
26 # |
|
27 # Having the $BUG_PROJECT set: |
|
28 # 1. Create the database: |
|
29 # bug create |
|
30 # 2. Add an issue |
|
31 # bug add |
|
32 # Use integers for the priorities. Higher -> more priority. |
|
33 # Use any words you prefer for the state |
|
34 # Don't break the number of lines until "-- Description --". Write |
|
35 # multilines only below that label. |
|
36 # 3. List the issues (all but description, priority sorted) |
|
37 # bug list [ | grep as_you_wish ] |
|
38 # 4. View an issue |
|
39 # bug view <ID> |
|
40 # 5. Edit an issue |
|
41 # bug edit <ID> |
|
42 # Change the state, the priority, add data as long as you fix it, ... |
|
43 # When I consider an issue is fulfilled, I negate its priority. |
|
44 # 6. Delete an issue |
|
45 # bug delete <ID> |
|
46 # Do that whenever you will not need the issue anymore. |
|
47 # |
2 |
48 |
3 PNAME=`basename "$0"` |
49 PNAME=`basename "$0"` |
4 CMD="$1" |
50 CMD="$1" |
5 |
51 |
6 if [ "x$EDITOR" == "x" ]; then |
52 if [ "x$EDITOR" == "x" ]; then |