forgot to add acooliodude's overlay instructions
Browse files
+9 −2 readme.org
| @@ -1,5 +1,5 @@ | |||
| 1 | -#+TITLE: sfetch (simple fetch) | 1 | +#+TITLE: sfetch |
| 2 | -#+AUTHOR: theidioticdev | 2 | +#+AUTHOR: fordon_greeman |
| 3 | #+OPTIONS: toc:nil num:nil | 3 | #+OPTIONS: toc:nil num:nil |
| 4 | 4 | ||
| 5 | a fetching program I wrote to improve at C. | 5 | a fetching program I wrote to improve at C. |
| @@ -24,4 +24,11 @@ or by using pkger (shameless promotion >:D) | |||
| 24 | #+BEGIN_SRC sh :eval no | 24 | #+BEGIN_SRC sh :eval no |
| 25 | pkger get sfetch | 25 | pkger get sfetch |
| 26 | #+END_SRC | 26 | #+END_SRC |
| 27 | +note: if you use gentoo, you can do this instead: | ||
| 28 | +#+BEGIN_SRC sh :eval no | ||
| 29 | + # you must have eselect-repository package | ||
| 30 | + eselect repository enable acooliodude-overlay | ||
| 31 | + emerge --sync acooliodude-overlay | emiant sync -r acooliodude-overlay | ||
| 32 | + emerge --ask sfetch | ||
| 33 | +#+END_SRC | ||
| 27 | 34 | ||
+1 −2 sfetch.c
| @@ -1,5 +1,4 @@ | |||
| 1 | /* the unsuckless update */ | 1 | /* the unsuckless update */ |
| 2 | - | ||
| 3 | #include <stdio.h> | 2 | #include <stdio.h> |
| 4 | #include <sys/utsname.h> | 3 | #include <sys/utsname.h> |
| 5 | #include <sys/stat.h> | 4 | #include <sys/stat.h> |
| @@ -58,7 +57,7 @@ config_parse (const char *fp) | |||
| 58 | while (fgets(line, sizeof(line), f)) | 57 | while (fgets(line, sizeof(line), f)) |
| 59 | { | 58 | { |
| 60 | char key[64], val[512]; | 59 | char key[64], val[512]; |
| 61 | - | 60 | + /* boilerplate... */ |
| 62 | if (sscanf (line, " %63[^ =] = %511s", key, val) == 2) | 61 | if (sscanf (line, " %63[^ =] = %511s", key, val) == 2) |
| 63 | { | 62 | { |
| 64 | if (strcmp(key, "ascii") == 0) | 63 | if (strcmp(key, "ascii") == 0) |