Added PIZZAART-options birthdaycake, christmastree
This commit is contained in:
parent
e381c3fceb
commit
0cc2bc3919
1 changed files with 12 additions and 4 deletions
16
src/pizza
16
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 <addr> Receivers address (non-optional)"
|
||||
echo " -s <addr> 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
|
Loading…
Reference in a new issue