chiark
/
gitweb
/
~ianmdlvl
/
post-pizza-notify.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
73762e1
)
better usage message
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 11 Apr 2014 16:35:15 +0000
(17:35 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Fri, 11 Apr 2014 16:35:15 +0000
(17:35 +0100)
notify
patch
|
blob
|
history
diff --git
a/notify
b/notify
index 83bf60804aa21ba143cffbf823f0cf99820e062f..f47a19d3641a8c2cafd03ffe6b54e68954094bf1 100755
(executable)
--- a/
notify
+++ b/
notify
@@
-1,10
+1,21
@@
#!/bin/bash
set -e
+usage () { cat <<END
+
+usage: ./notify senderfile recipientsfile 'message'
+
+recipientsfile: see test-recipients for an example
+
+senderinfo: file containing
+ email YOUREMAILADDRESS@EXAMPLE.COM
+ name YOUR NAME
+
+END
+}
case "$#.$1" in
3.[^-]*) ;;
-*) echo >&2 "usage: ./notify senderfile recipientsfile 'message'"
- exit 1 ;;
+*) usage >&2; exit 1 ;;
esac
senderinfo="$1"