fix uwufetch broken on debian

This commit is contained in:
zcake 2021-03-07 23:39:50 +08:00
parent 2159a9160c
commit 4f15cb7208

View file

@ -112,7 +112,7 @@ void get_info() { // get all necessary info
memmove(&shell[0], &shell[5], 16); memmove(&shell[0], &shell[5], 16);
// os version // os version
FILE *fos_rel = popen("cat /etc/os-release | grep ID= | cut -d '=' -f2 2> /dev/null", "r"); FILE *fos_rel = popen("cat /etc/os-release | awk '/^ID=/' | awk -F '=' '{print $2}' 2> /dev/null", "r");
fscanf(fos_rel,"%[^\n]", version_name); fscanf(fos_rel,"%[^\n]", version_name);
fclose(fos_rel); fclose(fos_rel);