Compare commits

...

2 Commits

2 changed files with 13 additions and 13 deletions

View File

@ -4,16 +4,16 @@ This script depends on `bc`.
### Help
```
Usage: ./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|") ]
./pizza.sh [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]
Usage: ./pizza.sh [ -f <N> ] [ -r <recipe> ] [ <pan diameter>(in|inch|") ]
./pizza.sh [ -f <N> ] [ -r <recipe> ] [ <flour weight>g ]
./pizza.sh -h
./pizza.sh -r [ -v <variation> ]
./pizza.sh [ -v <variation> ] [ -r <recipe> ] -i
Options:
-h Print this help
-r Print the recipe
-i Print the instructions
-f <N> Set flour per square inch (default: 2.122)
-v <variation> Set variation (default: standmixer)
-R <recipe> Set recipe (default: quick)
-r <recipe> Set recipe (default: quick)
Notes:
The dough can be kept overnight in the refidgerator if needed
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
echo "Pizza Calculator: The pizza script you never asked for"
echo
echo "Usage: $0 [ -f <N> ] [ -R <recipe> ] [ <pan diameter>(in|inch|\") ]"
echo " $0 [ -f <N> ] [ -R <recipe> ] [ <flour weight>g ]"
echo "Usage: $0 [ -f <N> ] [ -r <recipe> ] [ <pan diameter>(in|inch|\") ]"
echo " $0 [ -f <N> ] [ -r <recipe> ] [ <flour weight>g ]"
echo " $0 -h"
echo " $0 -r [ -v <variation> ]"
echo " $0 [ -v <variation> ] [ -r <recipe> ] -i"
echo "Options:"
echo " -h Print this help"
echo " -r Print the recipe"
echo " -i Print the instructions"
echo " -f <N> Set flour per square inch (default: 2.122)"
echo " -v <variation> Set variation (default: standmixer)"
echo " -R <recipe> Set recipe (default: quick)"
echo " -r <recipe> Set recipe (default: quick)"
echo "Notes:"
echo " The dough can be kept overnight in the refidgerator if needed"
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'
}
while getopts ":hrv:R:f:" option; do # loop through options, casing them
while getopts ":hiv:r:f:" option; do # loop through options, casing them
case $option in
h)
pizzahelp
exit;;
r)
i)
pizzarecipe
exit;;
f) # the end result of changing this is to alter crust thickness
FSI="$OPTARG";;
v) # change variation (usually between hand and standmixer)
VARIATION="$OPTARG";;
R) # change dough recipe
r) # change dough recipe
RECIPE="$OPTARG";;
\?)
echo "Error: Invalid option"