PlainOsBuilder/test.sh
2024-05-31 18:07:40 +03:00

39 lines
488 B
Bash
Executable File

#!/bin/sh
#Make
if ! make -h > /dev/null; then
echo "[FAILED] Make is not installed..."
exit 1
fi
#Git
if git > /dev/null; then
echo "[FAILED] Git is not installed..."
exit 1
fi
#Texinfo
if ! makeinfo -h > /dev/null; then
echo "[FAILED] Texinfo is not installed..."
exit 1
fi
#C
echo -e "#include <stdio.h>\nint main(void){return 0;}" > test.c
$CC test.c
rm test.c
if ! ./$out_name; then
echo "[FAILED] Fix c compiler or headers..."
rm a.out
exit 1
fi
rm a.out
exit 0