summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2009-12-01 18:20:55 +0530
committerVijay Bellur <vijay@gluster.com>2009-12-01 18:20:55 +0530
commit2167d8999350c22bba521aca75b4f0aea6c2d524 (patch)
tree84f4618ba1f080802d1368636f38a626701efff8
parentd63a382f7ffd5f9e019a3dd3b63ac35a9f05e8cc (diff)
init: Support for printing description optionally
-rw-r--r--init16
1 files changed, 13 insertions, 3 deletions
diff --git a/init b/init
index e857be9..b6a8351 100644
--- a/init
+++ b/init
@@ -17,18 +17,28 @@
# <http://www.gnu.org/licenses/>.
#
set -u
+DESC=0
function ok ()
{
desc=$@
- echo $desc
- echo "$BUGID: ok - $desc"
+ if [ $DESC -ne "0" ]
+ then
+ echo "$BUGID: ok - $desc"
+ else
+ echo "$BUGID: ok"
+ fi
}
function not_ok ()
{
desc=$@
- echo "$BUGID: not ok - $desc"
+ if [ $DESC -ne "0" ]
+ then
+ echo "$BUGID: not ok - $desc"
+ else
+ echo "$BUGID: not ok"
+ fi
}
[ $# -ne 1 ] && {