#!/bin/sh require_value() { local name=$1; shift if [ -z "$@" ]; then echo "expected value for: $name" exit 1 fi }