Merge pull request #186 from hellisabove/main
Changed the default location of '/usr/lib' to '/usr/local/lib' for mac os
This commit is contained in:
commit
30904e3a64
2 changed files with 8 additions and 1 deletions
5
Makefile
5
Makefile
|
@ -33,7 +33,7 @@ debug:
|
|||
$(CC) $(CFLAGS_DEBUG) -o $(NAME) $(FILES)
|
||||
./$(NAME)
|
||||
|
||||
install:
|
||||
install: build
|
||||
mkdir -p $(DESTDIR)/$(PREFIX) $(DESTDIR)/$(LIBDIR)/uwufetch $(DESTDIR)/$(MANDIR)
|
||||
cp $(NAME) $(DESTDIR)/$(PREFIX)/$(NAME)
|
||||
cp -r res/* $(DESTDIR)/$(LIBDIR)/uwufetch
|
||||
|
@ -53,6 +53,9 @@ termux_uninstall:
|
|||
rm -rf $(DESTDIR)/data/data/com.termux/files$(PREFIX)/$(NAME)
|
||||
rm -rf $(DESTDIR)/data/data/com.termux/files/usr/lib/uwufetch/
|
||||
|
||||
clean:
|
||||
rm $(NAME)
|
||||
|
||||
man:
|
||||
gzip --keep $(NAME).1
|
||||
|
||||
|
|
|
@ -325,6 +325,8 @@ void print_image(struct info* user_info) {
|
|||
else {
|
||||
if (strcmp(user_info->os_name, "android") == 0)
|
||||
sprintf(command, "viu -t -w 18 -h 8 /data/data/com.termux/files/usr/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); // image command for android
|
||||
else if (strcmp(user_info->os_name, "macos") == 0)
|
||||
sprintf(command, "viu -t -w 18 -h 8 /usr/local/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name);
|
||||
else
|
||||
sprintf(command, "viu -t -w 18 -h 8 /usr/lib/uwufetch/%s.png 2> /dev/null", user_info->os_name); // image command for other systems
|
||||
}
|
||||
|
@ -631,6 +633,8 @@ void print_ascii(struct info* user_info) {
|
|||
if (!file) { // if the file does not exist in the local directory, open it from the installation directory
|
||||
if (strcmp(user_info->os_name, "android") == 0)
|
||||
sprintf(ascii_file, "/data/data/com.termux/files/usr/lib/uwufetch/ascii/%s.txt", user_info->os_name);
|
||||
else if (strcmp(user_info->os_name, "macos") == 0)
|
||||
sprintf(ascii_file, "/usr/local/lib/uwufetch/ascii/%s.txt", user_info->os_name);
|
||||
else
|
||||
sprintf(ascii_file, "/usr/lib/uwufetch/ascii/%s.txt", user_info->os_name);
|
||||
|
||||
|
|
Loading…
Reference in a new issue