diff options
Diffstat (limited to 'sts')
-rwxr-xr-x | sts | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,10 +1,15 @@ #!/bin/sh # scale triggered store +WEIGHT="$1" + +[ "${WEIGHT}" ] || { echo "First argument must be an amount." >&2; exit 1; } +[ "${WEIGHT}" -gt 0 ] || { echo "Amount must be larger than zero." >&2; exit 1; } + cd $HOME/mat/matplan/ if (grep -q v currently_cooking); then - PRINT_WITH_LOGO=y ./mat storeportion `cat currently_cooking|sed 's/v//'` "$1" hemfrys + PRINT_WITH_LOGO=y ./mat storeportion `cat currently_cooking|sed 's/v//'` "${WEIGHT}" hemfrys else - ./mat storeportion `cat currently_cooking|sed 's/v//'` "$1" hemfrys + ./mat storeportion `cat currently_cooking|sed 's/v//'` "${WEIGHT}" hemfrys fi |