# check.sh -- Some checks for required thirdparty software. # # Part of clbuild by Luke Gorrie and contributors. check_program() { if ! "$1" --help >/dev/null; then echo Error: Cannot find a working installation of "$1" exit 1 fi echo "found `which $1`" } # for programs that don't understand --help, or (like cvs) are stupid enough # to return a failure code when invoked using a correct --help option... check_misdesigned_program() { if ! which "$1" >/dev/null; then echo Error: Cannot find a working installation of "$1" exit 1 fi echo "found `which $1`" } check() { echo "Checking for helper applications..." check_misdesigned_program cvs check_program svn check_program darcs check_program wget check_program tar check_misdesigned_program curl check_misdesigned_program git check_misdesigned_program mktemp echo "Success: All helper applications found." echo echo "Checking Lisp startup..." if ${lisp} $run_options $eval $quit >/dev/null; then echo "Success: Lisp starts up using \"$lisp\"" else echo "Error: Cannot run Lisp using \"$lisp\"" exit 1 fi echo echo "Looking for installable systems..." count_systems }