diff --git a/assets/new_year b/assets/new_year new file mode 100644 index 0000000..2bb998b --- /dev/null +++ b/assets/new_year @@ -0,0 +1,25 @@ +.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:. + * ) * + ) * ( + ) ( ( + ( ) ( ) + ) * ) ) ( + ( ( ( * + ) H ) ) + [ ] ( + ( * |-| * ) ( + * ) |_| . ) + ( | | . + ) / \ . ' . * + ( |_____| ' . . + ) | ___ | \~~~/ ' . ( + * | \ / | \_/ \~~~/ ) + | _Y_ | | \_/ ( + * |-----| __|__ | * + `-----` __|__ + + __, ,__) __, ,__) __, ,__) + (--|__| _ ,_ ,_ (--|\ | _ (--\ | _ _ ,_ + _| |(_||_)|_)(_| _| \|(/_(_|_) \|(/_(_|| + ( | | ,_| ( (__| + .:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:. \ No newline at end of file diff --git a/src/pizza b/src/pizza index e7914cc..56df2e9 100755 --- a/src/pizza +++ b/src/pizza @@ -8,61 +8,65 @@ PIZZARCV= PIZZASEND= help() { - echo "pizza - sent small ASCII-Icons by Mail" - echo "--------------------------------------" - 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" + echo "pizza - sent small ASCII-Icons by Mail" + echo "--------------------------------------" + echo "Usage: -p Send a pizza (default)" + echo " -l Send a heart" + echo " -b Send happy birthday" + echo " -c Send merry christmas" + echo " -n Send a happy new year" + echo " -m Receivers address (non-optional)" + echo " -s Senders address, defaults to user@host" + echo " -h Print this help-message" } if [ ! $1 ]; then - echo "Argument needed!" - help - exit 1 + echo "Argument needed!" + help + exit 1 fi -while getopts "plbchm:s:" opt; do - case ${opt} in - p ) - : ${PIZZAART:="pizza"} - ;; - l ) - : ${PIZZAART:="heart"} - ;; - b ) - : ${PIZZAART:="birthdaycake"} - ;; - c ) - : ${PIZZAART:="christmastree"} - ;; - m ) - PIZZARCV="${OPTARG}" - ;; - s ) - PIZZASEND="${OPTARG}" - ;; - h ) - help - exit 0 - ;; - \?) - help - exit 1 - ;; - esac +while getopts "plbcnhm:s:" opt; do + case ${opt} in + p ) + : ${PIZZAART:="pizza"} + ;; + l ) + : ${PIZZAART:="heart"} + ;; + b ) + : ${PIZZAART:="birthdaycake"} + ;; + c ) + : ${PIZZAART:="christmastree"} + ;; + n ) + : ${PIZZAART:="new_year"} + ;; + m ) + PIZZARCV="${OPTARG}" + ;; + s ) + PIZZASEND="${OPTARG}" + ;; + h ) + help + exit 0 + ;; + \?) + help + exit 1 + ;; + esac done : ${PIZZAART:="pizza"} : ${PIZZASEND:="${PIZZAUSER}@${PIZZAHOST}"} if [ ! $PIZZARCV ]; then - echo "Argument '-m' and mailaddress needed!" - help - exit 1 + echo "Argument '-m' and mailaddress needed!" + help + exit 1 fi mail -s "${PIZZAUSER} sent you a ${PIZZAART} on ${PIZZAHOST}!" -S from=${PIZZASEND} ${PIZZARCV} < "${PIZZAINC}/${PIZZAART}"