From e71fa14b9897c92ea1ee08b7392a03f99b3cf8a9 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 7 Jun 2024 15:01:35 +0300 Subject: [PATCH] Updated build.sh --- build.sh | 17 +++++++++++++++++ include/logo.h | 1 - 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/build.sh b/build.sh index f5bf681..629fb5c 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,24 @@ #!/bin/sh + CC=cc FLAGS="-Os -s -pedantic -Wall -Wextra" +#Test +echo -e "#include \nint main(void){return 0;}" > file.c +cc file.c -o test +rm file.c + +if ! ./test +then + rm test + echo "Install libc-headers and C compiler (ep: tcc, clang, gcc)" + + exit 1 +fi + +rm test + +#Compile $CC -Iinclude -I. src/main.c -c -o main.o && $CC -Iinclude -I. src/fetch.c -c -o fetch.o && $CC $FLAGS main.o fetch.o -o kfetch && diff --git a/include/logo.h b/include/logo.h index eaf0462..95fc188 100644 --- a/include/logo.h +++ b/include/logo.h @@ -123,4 +123,3 @@ char *Unknow[] = { }; #endif -