summaryrefslogtreecommitdiffstats
path: root/cholerab/knut/clients/cnot
diff options
context:
space:
mode:
authortv <tv@xso>2011-08-13 15:49:43 +0200
committertv <tv@xso>2011-08-13 15:49:43 +0200
commitc36f72a019abcd22fca3dc550e1a239c1d161f1f (patch)
treeab496cb5272924f142ab1c543625dfb489db5d23 /cholerab/knut/clients/cnot
parent541620dc51862d588a2bdfea9b84dbf9bf21bf73 (diff)
cholerab cnot: be verbose on demand only
Diffstat (limited to 'cholerab/knut/clients/cnot')
-rwxr-xr-xcholerab/knut/clients/cnot/index10
1 files changed, 8 insertions, 2 deletions
diff --git a/cholerab/knut/clients/cnot/index b/cholerab/knut/clients/cnot/index
index d17329f4..f276dd25 100755
--- a/cholerab/knut/clients/cnot/index
+++ b/cholerab/knut/clients/cnot/index
@@ -2,7 +2,7 @@
#
# cnot - cholerab live command line notification client, bitch!
#
-# usage: cnot hostname message...
+# usage: [verbose=yes] cnot hostname [message...]
#
set -euf
@@ -11,6 +11,12 @@ port=42101
params="$*"
-exec curl -vsS -X PUT --data-binary @- "http://$host:$port" <<EOF
+flags=-sS
+
+if test "${verbose-no}" != no; then
+ flags="${flags+$flags }-v"
+fi
+
+exec curl $flags -X PUT --data-binary @- "http://$host:$port" <<EOF
{"method":"clive","params":"$params","id":null}
EOF