Add help option and usage output
@@ -70,9 +70,19 @@ findhost
# END environment bootstrap section
+usage() {
+ echo "Run Zookeeper command-line client"
+ echo "The following options are recognized:"
+ echo ""
+
+ echo "-h|-help) print this help text"
+ echo "-nosudo do not use sudo when running command"
+}
+
sudo="sudo -u ${VESPA_USER}"
while [ $# -gt 0 ]; do
case $1 in
+ -h|-help) usage; exit 0;;
-nosudo) shift; sudo="" ;;
*) echo "Unrecognized option '$1'" >&2; exit 1;;
esac
