#!/bin/bash setglobal NEEDED_PROGRAMS = ''( curl git rsync ssh ) setglobal FAILED = '0' for binary in [$(NEEDED_PROGRAMS[@])] { if ! which $binary >/dev/null { setglobal FAILED = '1' echo "Unable to locate $binary on the path." > !2 } } if [[ $FAILED != 0 ]] { echo "Please see above error output to determine which programs you need to install or make available on your path. Aborting." > !2 exit 1 }