Fix for Arco

This commit is contained in:
Јован Ђокић-Шумарац 2021-05-20 09:52:43 +02:00
parent 5d21fe1e40
commit cb7e5c4caa
2 changed files with 7 additions and 3 deletions

BIN
fetchy

Binary file not shown.

View file

@ -188,15 +188,19 @@ static char *get_sys(char *sys, char *os_name){
fclose(sysName); fclose(sysName);
truncate_spaces_leading(name); truncate_spaces_leading(name);
snprintf(os_name, BUF_SIZE, "\x1b[36mOS\x1b[0m -> %s Linux", name);
if ( !strcmp( name, "Arch") ) *sys = 'a'; if ( !strcmp( name, "Arch") ) *sys = 'a';
if ( !strcmp( name, "Artix") ) *sys = 'x'; if ( !strcmp( name, "Artix") ) *sys = 'x';
if ( !strcmp( name, "Arco") ) *sys = 'r'; if ( !strcmp( name, "ArcoLinux") ) *sys = 'r';
if ( !strcmp( name, "Debian")) *sys = 'd'; if ( !strcmp( name, "Debian")) *sys = 'd';
if ( !strcmp( name, "Ubuntu")) *sys = 'u'; if ( !strcmp( name, "Ubuntu")) *sys = 'u';
if( *sys == 'r' )
snprintf(os_name, BUF_SIZE, "\x1b[36mOS\x1b[0m -> %s", name);
else
snprintf(os_name, BUF_SIZE, "\x1b[36mOS\x1b[0m -> %s Linux", name);
free(name); free(name);
return os_name; return os_name;
} }