diff --git a/build.sh b/build.sh index f687c63..b48c0f7 100755 --- a/build.sh +++ b/build.sh @@ -1,3 +1,12 @@ git submodule init git submodule update -musl-gcc rtracker.c -o rtracker + +# Check what compiler we have +if type "musl-gcc" > /dev/null 2>&1; then + CC="musl-gcc" +else + echo "[WARN]: using gcc instead of musl-gcc (recommended)" + CC="gcc" +fi + +$CC rtracker.c -o rtracker diff --git a/c_cross_pack b/c_cross_pack index 3a07a9b..6bbd07c 160000 --- a/c_cross_pack +++ b/c_cross_pack @@ -1 +1 @@ -Subproject commit 3a07a9b5ed183ef35312c07c435981b528e75ac8 +Subproject commit 6bbd07c028563ca580831b88423acff20a9efa47 diff --git a/rtracker b/rtracker deleted file mode 100755 index f149920..0000000 Binary files a/rtracker and /dev/null differ diff --git a/rtracker.c b/rtracker.c index d0f30ee..4204a7d 100644 --- a/rtracker.c +++ b/rtracker.c @@ -5,7 +5,7 @@ #include #include "c_cross_pack/libs/threads.h" -//#include "c_cross_pack/libs/time.h" already included +#include "c_cross_pack/libs/time.h" //already included #define CL_RED "\033[1;31m" #define CL_YELLOW "\033[1;33m" @@ -15,6 +15,9 @@ char comment[1000] = ""; char command[10000] = ""; +char tick[3] = "✓"; +char cross[3] = "⨯"; + #define OUT_LEN 1000 // 1000 items with 100 symbol len int out_len = OUT_LEN; // Output of command execution @@ -112,16 +115,16 @@ int main(int argc, char **argv) { start_thread(&thread_handle, loadAnim); if (runCommand(command)) { kill_thread(thread_handle); - printf("\r[%s🗸%s] %s\n", CL_GREEN, CL_NORMAL, comment); + printf("\r[%s%s%s] %s\n", CL_GREEN, tick, CL_NORMAL, comment); if (forceOut == true) { getOut(); } } else { kill_thread(thread_handle); if (justTry) { - printf("\r[%s🗸%s] %s\n", CL_GREEN, CL_NORMAL, comment); + printf("\r[%s%s%s] %s\n", CL_GREEN, tick, CL_NORMAL, comment); } else { - printf("\r[%s𐄂%s] %s\n", CL_RED, CL_NORMAL, comment); + printf("\r[%s%s%s] %s\n", CL_RED, cross, CL_NORMAL, comment); // Get out of failed command getOut(); return 1;