Compare commits
No commits in common. "dcd85d291b0157b951270ef0f9d460208cbdfae5" and "a5322ab1d8f4cc26ea5fc37d50f013326752c31d" have entirely different histories.
dcd85d291b
...
a5322ab1d8
10
README.md
10
README.md
|
@ -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 [ -v <variation> ] [ -r <recipe> ] -i
|
||||
./pizza.sh -r [ -v <variation> ]
|
||||
Options:
|
||||
-h Print this help
|
||||
-i Print the instructions
|
||||
-r Print the recipe
|
||||
-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
|
||||
|
|
16
pizza.sh
16
pizza.sh
|
@ -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 [ -v <variation> ] [ -r <recipe> ] -i"
|
||||
echo " $0 -r [ -v <variation> ]"
|
||||
echo "Options:"
|
||||
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 " -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 ":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
|
||||
h)
|
||||
pizzahelp
|
||||
exit;;
|
||||
i)
|
||||
r)
|
||||
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"
|
||||
|
|
Loading…
Reference in New Issue