Compare commits

..

No commits in common. "dcd85d291b0157b951270ef0f9d460208cbdfae5" and "a5322ab1d8f4cc26ea5fc37d50f013326752c31d" have entirely different histories.

2 changed files with 13 additions and 13 deletions

View File

@ -4,16 +4,16 @@ This script depends on `bc`.
### Help ### Help
``` ```
Usage: ./pizza.sh [ -f <N> ] [ -r <recipe> ] [ <pan diameter>(in|inch|") ] Usage: ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|") ]
./pizza.sh [ -f <N> ] [ -r <recipe> ] [ <flour weight>g ] ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]
./pizza.sh -h ./pizza.sh -h
./pizza.sh [ -v <variation> ] [ -r <recipe> ] -i ./pizza.sh -r [ -v <variation> ]
Options: Options:
-h Print this help -h Print this help
-i Print the instructions -r Print the recipe
-f <N> Set flour per square inch (default: 2.122) -f <N> Set flour per square inch (default: 2.122)
-v <variation> Set variation (default: standmixer) -v <variation> Set variation (default: standmixer)
-r <recipe> Set recipe (default: quick) -R <recipe> Set recipe (default: quick)
Notes: Notes:
The dough can be kept overnight in the refidgerator if needed The dough can be kept overnight in the refidgerator if needed
Water may also be used in place of beer Water may also be used in place of beer

View File

@ -7,16 +7,16 @@ shopt -s extglob
function pizzahelp { # this only prints help text function pizzahelp { # this only prints help text
echo "Pizza Calculator: The pizza script you never asked for" echo "Pizza Calculator: The pizza script you never asked for"
echo echo
echo "Usage: $0 [ -f <N> ] [ -r <recipe> ] [ <pan diameter>(in|inch|\") ]" echo "Usage: $0 [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|\") ]"
echo " $0 [ -f <N> ] [ -r <recipe> ] [ <flour weight>g ]" echo " $0 [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]"
echo " $0 -h" echo " $0 -h"
echo " $0 [ -v <variation> ] [ -r <recipe> ] -i" echo " $0 -r [ -v <variation> ]"
echo "Options:" echo "Options:"
echo " -h Print this help" echo " -h Print this help"
echo " -i Print the instructions" echo " -r Print the recipe"
echo " -f <N> Set flour per square inch (default: 2.122)" echo " -f <N> Set flour per square inch (default: 2.122)"
echo " -v <variation> Set variation (default: standmixer)" echo " -v <variation> Set variation (default: standmixer)"
echo " -r <recipe> Set recipe (default: quick)" echo " -R <recipe> Set recipe (default: quick)"
echo "Notes:" echo "Notes:"
echo " The dough can be kept overnight in the refidgerator if needed" echo " The dough can be kept overnight in the refidgerator if needed"
echo " Water may also be used in place of beer" echo " Water may also be used in place of beer"
@ -30,19 +30,19 @@ function pizzarecipe {
sed -n "/\[$RECIPE:instructions:$VARIATION\]/,/^$/p" "$PWD/pizza.txt" | sed '/\[*.\]/d' sed -n "/\[$RECIPE:instructions:$VARIATION\]/,/^$/p" "$PWD/pizza.txt" | sed '/\[*.\]/d'
} }
while getopts ":hiv:r:f:" option; do # loop through options, casing them while getopts ":hrv:R:f:" option; do # loop through options, casing them
case $option in case $option in
h) h)
pizzahelp pizzahelp
exit;; exit;;
i) r)
pizzarecipe pizzarecipe
exit;; exit;;
f) # the end result of changing this is to alter crust thickness f) # the end result of changing this is to alter crust thickness
FSI="$OPTARG";; FSI="$OPTARG";;
v) # change variation (usually between hand and standmixer) v) # change variation (usually between hand and standmixer)
VARIATION="$OPTARG";; VARIATION="$OPTARG";;
r) # change dough recipe R) # change dough recipe
RECIPE="$OPTARG";; RECIPE="$OPTARG";;
\?) \?)
echo "Error: Invalid option" echo "Error: Invalid option"