#!/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//'` "${WEIGHT}" hemfrys else ./mat storeportion `cat currently_cooking|sed 's/v//'` "${WEIGHT}" hemfrys fi