summaryrefslogtreecommitdiff
path: root/src/distro.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/distro.c')
-rw-r--r--src/distro.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/distro.c b/src/distro.c
index 845f85e..f39d1ea 100644
--- a/src/distro.c
+++ b/src/distro.c
@@ -51,9 +51,16 @@ void display_distro() {
while (fgets(buf, sizeof(buf), p) != NULL) {
buf[strcspn(buf, "\n")] = '\0';
printf("%s", buf);
- distroname = buf;
}
+ if (strstr(buf, "Devuan") != NULL) distroname = "devuan";
+ else if (strstr(buf, "Void Linux") != NULL) distroname = "void";
+ else if (strstr(buf, "Debian") != NULL) distroname = "debian";
+ else if (strstr(buf, "Arch Linux") != NULL) distroname = "arch";
+ else if (strstr(buf, "Artix Linux") != NULL) distroname = "artix";
+ else if (strstr(buf, "CRUX") != NULL) distroname = "crux";
+ else distroname = "linux";
+
pclose(p);
}
#endif