First template
This commit is contained in:
parent
d68569741d
commit
21916131b3
1 changed files with 28 additions and 21 deletions
49
src/pizza
49
src/pizza
|
@ -3,6 +3,8 @@
|
||||||
: ${PIZZAINC:="/usr/local/share/pizza"}
|
: ${PIZZAINC:="/usr/local/share/pizza"}
|
||||||
PIZZAHOST=$(hostname -f)
|
PIZZAHOST=$(hostname -f)
|
||||||
PIZZAUSER=$(whoami)
|
PIZZAUSER=$(whoami)
|
||||||
|
PIZZAART=
|
||||||
|
PIZZARCV=
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
echo "pizza - sent small ASCII-Icons by Mail"
|
echo "pizza - sent small ASCII-Icons by Mail"
|
||||||
|
@ -12,25 +14,30 @@ help() {
|
||||||
echo " -h | --help Print this help-message"
|
echo " -h | --help Print this help-message"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ ! "$2" ]; then
|
while getopts <argstring> ; do
|
||||||
mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}!" $1 < "${PIZZAINC}/pizza"
|
<case>
|
||||||
exit 0
|
done
|
||||||
else
|
|
||||||
case "$1" in
|
|
||||||
"-p" | "--pizza")
|
# if [ ! "$2" ]; then
|
||||||
mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}" $2 < "${PIZZAINC}/pizza"
|
# mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}!" $1 < "${PIZZAINC}/pizza"
|
||||||
;;
|
# exit 0
|
||||||
"-l" | "--heart")
|
# else
|
||||||
mail -s "${PIZZAUSER} sent you a Heart on ${PIZZAHOST}" $2 < "${PIZZAINC}/heart"
|
# case "$1" in
|
||||||
;;
|
# "-p" | "--pizza")
|
||||||
"-h" | "--help")
|
# mail -s "${PIZZAUSER} sent you a Pizza on ${PIZZAHOST}" $2 < "${PIZZAINC}/pizza"
|
||||||
help
|
# ;;
|
||||||
;;
|
# "-l" | "--heart")
|
||||||
*)
|
# mail -s "${PIZZAUSER} sent you a Heart on ${PIZZAHOST}" $2 < "${PIZZAINC}/heart"
|
||||||
echo "Unknown Argument!"
|
# ;;
|
||||||
help
|
# "-h" | "--help")
|
||||||
exit 100
|
# help
|
||||||
;;
|
# ;;
|
||||||
esac
|
# *)
|
||||||
fi
|
# echo "Unknown Argument!"
|
||||||
|
# help
|
||||||
|
# exit 100
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
# fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue