summaryrefslogtreecommitdiff
path: root/src/distro.c
diff options
context:
space:
mode:
author諏訪子 <suwako@076.moe>2024-06-18 19:12:24 +0900
committer諏訪子 <suwako@076.moe>2024-06-18 19:12:24 +0900
commitb48f40f863c80c9f8394cfd5e8c3716191611888 (patch)
treea9ee6502cd5771bc0ed3a336e9b5cfdeaba86e63 /src/distro.c
parent79285280a55c9a420947620ae20d327563f9ce78 (diff)
パッケージ情報の追加
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