chiark
/
gitweb
/
~ianmdlvl
/
post-pizza-notify.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better usage message
[post-pizza-notify.git]
/
notify
diff --git
a/notify
b/notify
index 83bf60804aa21ba143cffbf823f0cf99820e062f..f47a19d3641a8c2cafd03ffe6b54e68954094bf1 100755
(executable)
--- a/
notify
+++ b/
notify
@@
-1,10
+1,21
@@
#!/bin/bash
set -e
#!/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.[^-]*) ;;
case "$#.$1" in
3.[^-]*) ;;
-*) echo >&2 "usage: ./notify senderfile recipientsfile 'message'"
- exit 1 ;;
+*) usage >&2; exit 1 ;;
esac
senderinfo="$1"
esac
senderinfo="$1"