#!/bin/sh find_dep() { dep=$1 which $dep > /dev/null 2>&1 if [ $? -eq 0 ]; then echo found: $dep else echo error: $dep is required, but not installed fi } find_dep ruby find_dep bundle find_dep node find_dep npm find_dep nginx find_dep doas