From 21916131b3c27fb977c14a4770d380eae690706c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20R=C3=BCmpelein?= Date: Sun, 28 Dec 2014 18:21:31 +0100 Subject: [PATCH] First template --- src/pizza | 49 ++++++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/src/pizza b/src/pizza index 8258444..d81d050 100755 --- a/src/pizza +++ b/src/pizza @@ -3,6 +3,8 @@ : ${PIZZAINC:="/usr/local/share/pizza"} PIZZAHOST=$(hostname -f) PIZZAUSER=$(whoami) +PIZZAART= +PIZZARCV= help() { echo "pizza - sent small ASCII-Icons by Mail" @@ -12,25 +14,30 @@ help() { echo " -h | --help Print this help-message" } -if [ ! "$2" ]; then - mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}!" $1 < "${PIZZAINC}/pizza" - exit 0 -else - case "$1" in - "-p" | "--pizza") - mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}" $2 < "${PIZZAINC}/pizza" - ;; - "-l" | "--heart") - mail -s "${PIZZAUSER} sent you a Heart on ${PIZZAHOST}" $2 < "${PIZZAINC}/heart" - ;; - "-h" | "--help") - help - ;; - *) - echo "Unknown Argument!" - help - exit 100 - ;; - esac -fi +while getopts ; do + +done + + +# if [ ! "$2" ]; then +# mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}!" $1 < "${PIZZAINC}/pizza" +# exit 0 +# else +# case "$1" in +# "-p" | "--pizza") +# mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}" $2 < "${PIZZAINC}/pizza" +# ;; +# "-l" | "--heart") +# mail -s "${PIZZAUSER} sent you a Heart on ${PIZZAHOST}" $2 < "${PIZZAINC}/heart" +# ;; +# "-h" | "--help") +# help +# ;; +# *) +# echo "Unknown Argument!" +# help +# exit 100 +# ;; +# esac +# fi exit 0