From 0cc2bc39196e8708527af8b9fd9a2f3bc635fea5 Mon Sep 17 00:00:00 2001 From: Gesina Schwalbe Date: Fri, 2 Jan 2015 15:52:22 +0100 Subject: [PATCH] Added PIZZAART-options birthdaycake, christmastree --- src/pizza | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/pizza b/src/pizza index d7ff8f3..d78daed 100755 --- a/src/pizza +++ b/src/pizza @@ -10,8 +10,10 @@ PIZZASEND= help() { echo "pizza - sent small ASCII-Icons by Mail" echo "--------------------------------------" - echo "Usage: -p Sent a pizza (default)" - echo " -l Sent a heart" + echo "Usage: -p Send a pizza (default)" + echo " -l Send a heart" + echo " -b Send happy birthday" + echo " -c Send merry christmas" echo " -m Receivers address (non-optional)" echo " -s Senders address, defaults to user@host" echo " -h Print this help-message" @@ -23,7 +25,7 @@ if [ ! $1 ]; then exit 1 fi -while getopts "plhm:s:" opt; do +while getopts "plbchm:s:" opt; do case ${opt} in p ) : ${PIZZAART:="pizza"} @@ -31,6 +33,12 @@ while getopts "plhm:s:" opt; do l ) : ${PIZZAART:="heart"} ;; + b ) + : ${PIZZAART:="birthdaycake"} + ;; + c ) + : ${PIZZAART:="christmastree"} + ;; m ) PIZZARCV="${OPTARG}" ;; @@ -58,4 +66,4 @@ if [ ! $PIZZARCV ]; then fi mail -s "${PIZZAUSER} sent you a ${PIZZAART} on ${PIZZAHOST}!" -S from=${PIZZASEND} ${PIZZARCV} < "${PIZZAINC}/${PIZZAART}" -exit 0 +exit 0 \ No newline at end of file