#!/bin/sh out_name=$(mktemp XXXXXX) echo "#include " >> test.c echo "int main(void){return 0;}" >> test.c $CC test.c -o $out_name rm test.c if ./$out_name; then echo "[OK] C compiler work..." rm $out_name exit 0 else echo "[FAILED] Fix c compiler or headers..." rm $out_name exit 1 fi