Added cpuinfo to freebsd port
This commit is contained in:
commit
d0597d5909
3 changed files with 13 additions and 5 deletions
9
Makefile
9
Makefile
|
@ -1,7 +1,7 @@
|
||||||
NAME = uwufetch
|
NAME = uwufetch
|
||||||
FILES = uwufetch.c
|
FILES = uwufetch.c
|
||||||
CFLAGS = -O3
|
CFLAGS = -O3
|
||||||
CFLAGS_DEBUG = -Wall -Wextra
|
CFLAGS_DEBUG = -Wall -Wextra -g -pthread
|
||||||
ifeq ($(shell uname), Linux)
|
ifeq ($(shell uname), Linux)
|
||||||
PREFIX = /usr/bin
|
PREFIX = /usr/bin
|
||||||
LIBDIR = /usr/lib
|
LIBDIR = /usr/lib
|
||||||
|
@ -11,9 +11,16 @@ else ifeq ($(shell uname), Darwin)
|
||||||
LIBDIR = /usr/local/lib
|
LIBDIR = /usr/local/lib
|
||||||
MANDIR = /usr/local/share/man/man1
|
MANDIR = /usr/local/share/man/man1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC = cc
|
CC = cc
|
||||||
MAN_COMPILER = pandoc
|
MAN_COMPILER = pandoc
|
||||||
|
|
||||||
|
ifeq ($(shell uname), FreeBSD)
|
||||||
|
CFLAGS += -D__FREEBSD__
|
||||||
|
CFLAGS_DEBUG += -D__FREEBSD__
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
build: $(FILES)
|
build: $(FILES)
|
||||||
$(CC) $(CFLAGS) -o $(NAME) $(FILES)
|
$(CC) $(CFLAGS) -o $(NAME) $(FILES)
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ I am not a copyright expert, and maybe I am doing all wrong things, please corre
|
||||||
|
|
||||||
## Endeavour OS
|
## Endeavour OS
|
||||||
|
|
||||||
<img title="Endowo Os" src="https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/endeavour.png" alt="image" width="100">
|
<img title="Endowo Os" src="https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/endeavouros.png" alt="image" width="100">
|
||||||
|
|
||||||
### Base artwork:
|
### Base artwork:
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ I am not a copyright expert, and maybe I am doing all wrong things, please corre
|
||||||
|
|
||||||
## OpenSuse
|
## OpenSuse
|
||||||
|
|
||||||
<img title="OwOsuse" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/"opensuse-leap".png' alt="image" width="100">
|
<img title="OwOsuse" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/opensuse-leap.png' alt="image" width="100">
|
||||||
|
|
||||||
### Base artwork:
|
### Base artwork:
|
||||||
|
|
||||||
|
@ -332,7 +332,7 @@ I am not a copyright expert, and maybe I am doing all wrong things, please corre
|
||||||
|
|
||||||
## VoidLinux
|
## VoidLinux
|
||||||
|
|
||||||
<img title="Owoid" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/"void".png' alt="image" width="100">
|
<img title="Owoid" src='https://raw.githubusercontent.com/TheDarkBug/uwufetch/main/res/void.png' alt="image" width="100">
|
||||||
|
|
||||||
### Base artwork:
|
### Base artwork:
|
||||||
|
|
||||||
|
|
|
@ -406,7 +406,7 @@ void get_info()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifndef __FREEBSD__
|
||||||
while (fgets(line, sizeof(line), cpuinfo))
|
while (fgets(line, sizeof(line), cpuinfo))
|
||||||
#ifdef __FREEBSD__
|
#ifdef __FREEBSD__
|
||||||
if (sscanf(line, "hw.model: %[^\n]", cpu_model))
|
if (sscanf(line, "hw.model: %[^\n]", cpu_model))
|
||||||
|
@ -415,6 +415,7 @@ void get_info()
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
sprintf(user, "%s", getenv("USER"));
|
sprintf(user, "%s", getenv("USER"));
|
||||||
|
#endif
|
||||||
if (iscygwin == 0)
|
if (iscygwin == 0)
|
||||||
fclose(os_release);
|
fclose(os_release);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue