Загрузить файлы в «/»
This commit is contained in:
parent
92fecf6370
commit
8846c69f1d
14
funcs.h
14
funcs.h
@ -112,11 +112,20 @@ void GetPkgs(void) {
|
||||
}
|
||||
|
||||
FILE *fp = popen(Logo.pkg_cmd, "r");
|
||||
if (fp == NULL) {
|
||||
printf("%sPKGS \033[0;37m0", Logo.color);
|
||||
return;
|
||||
}
|
||||
|
||||
printf("%sPKGS \033[0;37m", Logo.color);
|
||||
|
||||
char ch;
|
||||
while ((ch = fgetc(fp)) != '\n')
|
||||
while ((ch = fgetc(fp))) {
|
||||
if (feof(fp) || ch == '\n')
|
||||
break;
|
||||
|
||||
printf("%c", ch);
|
||||
}
|
||||
|
||||
pclose(fp);
|
||||
}
|
||||
@ -197,6 +206,9 @@ LOGO GetArt(void) {
|
||||
SetArt(&art, sizeof(Arch) / sizeof(char *), "pacman -Qq | wc -l", Arch, "\033[0;34m");
|
||||
}
|
||||
|
||||
else if (1)
|
||||
SetArt(&art, sizeof(Android) / sizeof(char *), "dpkg -l | tail -n+6 | wc -l", Android, "\033[32m");
|
||||
|
||||
else
|
||||
SetArt(&art, sizeof(Unknow) / sizeof(char *), NULL, Unknow, "\033[1;36m");
|
||||
|
||||
|
14
logos.h
14
logos.h
@ -1,3 +1,6 @@
|
||||
#ifndef LOGOS_H
|
||||
#define LOGOS_H
|
||||
|
||||
char *Debian[] = {
|
||||
"\033[31m _____ ",
|
||||
"\033[31m / __ \\ ",
|
||||
@ -39,6 +42,16 @@ char *Arch[] = {
|
||||
" "
|
||||
};
|
||||
|
||||
char *Android[] = {
|
||||
"\033[32m ;, ,; ",
|
||||
"\033[32m ';,.-----.,;' ",
|
||||
"\033[32m ,' ', ",
|
||||
"\033[32m / O O \\ ",
|
||||
"\033[32m| | ",
|
||||
"\033[32m'-----------------' ",
|
||||
" ",
|
||||
};
|
||||
|
||||
char *Unknow[] = {
|
||||
"\033[1;36m ___ ",
|
||||
"\033[1;36m (\033[0m..\033[1;36m | ",
|
||||
@ -50,3 +63,4 @@ char *Unknow[] = {
|
||||
" "
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user