From b48f40f863c80c9f8394cfd5e8c3716191611888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AB=8F=E8=A8=AA=E5=AD=90?= Date: Tue, 18 Jun 2024 19:12:24 +0900 Subject: =?UTF-8?q?=E3=83=91=E3=83=83=E3=82=B1=E3=83=BC=E3=82=B8=E6=83=85?= =?UTF-8?q?=E5=A0=B1=E3=81=AE=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/distro.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/distro.c') 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 -- cgit v1.2.3