Merge branch 'new_year'
Conflicts: src/pizza
This commit is contained in:
commit
55c32ccb80
2 changed files with 73 additions and 44 deletions
25
assets/new_year
Normal file
25
assets/new_year
Normal file
|
@ -0,0 +1,25 @@
|
|||
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
|
||||
* ) *
|
||||
) * (
|
||||
) ( (
|
||||
( ) ( )
|
||||
) * ) ) (
|
||||
( ( ( *
|
||||
) H ) )
|
||||
[ ] (
|
||||
( * |-| * ) (
|
||||
* ) |_| . )
|
||||
( | | .
|
||||
) / \ . ' . *
|
||||
( |_____| ' . .
|
||||
) | ___ | \~~~/ ' . (
|
||||
* | \ / | \_/ \~~~/ )
|
||||
| _Y_ | | \_/ (
|
||||
* |-----| __|__ | *
|
||||
`-----` __|__
|
||||
|
||||
__, ,__) __, ,__) __, ,__)
|
||||
(--|__| _ ,_ ,_ (--|\ | _ (--\ | _ _ ,_
|
||||
_| |(_||_)|_)(_| _| \|(/_(_|_) \|(/_(_||
|
||||
( | | ,_| ( (__|
|
||||
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:.
|
92
src/pizza
92
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 <addr> Receivers address (non-optional)"
|
||||
echo " -s <addr> 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 <addr> Receivers address (non-optional)"
|
||||
echo " -s <addr> 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}"
|
||||
|
|
Loading…
Reference in a new issue