diff --git a/scripts/dye b/scripts/dye index 6d808753..2f3cd58d 100755 --- a/scripts/dye +++ b/scripts/dye @@ -17,7 +17,7 @@ # along with this program. If not, see . printhelp() { -cat << EOM + cat < /dev/null ; then + for dep in "$@"; do + if ! command -v "$dep" &>/dev/null; then error "dependency not met: $dep" fi done - if [[ $missingdependencies -gt 0 ]] ; then + if [[ $missingdependencies -gt 0 ]]; then exit 1 fi } main() { + if [[ "$#" -lt 1 ]]; then + printhelp + fi + while getopts ":x:r:?" arg; do case $arg in x)