fordon_greeman / pkger

Branch: 05a5a58
Switch branches/tags
main
theidioticdev feat: use tsoding's nob.h, split repos.h into separate recipes 02f8442 13d ago
22 lines · 489 B Raw Blame History
1
2 #define NOB_IMPLEMENTATION
3 #include "nob.h"
4
5 int
6 main (int argc, char **argv)
7 {
8 NOB_GO_REBUILD_URSELF(argc, argv);
9
10 Cmd cmd = {0};
11 cmd_append (&cmd, "cc", "-Wall", "-Wextra", "-o", "pkger", "pkger.c");
12 if (!cmd_run(&cmd)) return 1;
13
14 char *home = getenv("HOME");
15 if (home)
16 {
17 const char *dest = nob_temp_sprintf("%s/.local/bin/pkger", home);
18 if (!nob_copy_file ("pkger", dest)) return 1;
19 nob_log (NOB_INFO, "installed to %s", dest);
20 }
21 return 0;
22 }