Index: /trunk/tools/mysql-dump/functions.sh
===================================================================
--- /trunk/tools/mysql-dump/functions.sh	(revision 31193)
+++ /trunk/tools/mysql-dump/functions.sh	(revision 31194)
@@ -1,4 +1,16 @@
 #!/bin/bash
 
+# Some useful functions that can be reused in sh scripts
+
+# log: A limited logging function
+#
+# Usage: log ARG1 ARG2
+# where ARG1: a log level (put what is sensible for you)
+#       ARG2: a message (preferrably enclosed in quotes)
+# The date is prepended to the log level and message
+# e.g.:
+#       log USELESS "A useless message" 
+#    will show something like:
+# 2011-04-01T08:00:00: USELESS: A useless message
 function log() {
     LOGLEVEL=`printf ":%8s:" $1`
@@ -9,4 +21,12 @@
 }
 
+# email: Send an e-mail
+#
+# Usage: email SUBJECT RECIPIENT MESSAGE
+# where SUBJECT: the e-mail subject
+#       RECIPIENT: a valid e-mail address
+#       MESSAGE: a message
+# e.g.:
+#       email "Monday?" mailing-list@dictators.org "Let's conquer the world"
 function email() {
     SUBJECT=$1
