Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 22 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
all: build
CC = gcc
CFLAGS = -Wall -Wextra -O2
TARGET = tinyfetch
SRC = src/tinyfetch.c
PREFIX = /usr/local

build:
gcc src/tinyfetch.c -o main
all: $(TARGET)

$(TARGET): $(SRC)
$(CC) $(CFLAGS) $(SRC) -o $(TARGET)

clean:
rm -f $(TARGET)

install: $(TARGET)
mkdir -p $(PREFIX)/bin
cp -f $(TARGET) $(PREFIX)/bin
chmod 755 $(PREFIX)/bin/$(TARGET)

uninstall:
rm -f $(PREFIX)/bin/$(TARGET)

.PHONY: clean install uninstall
28 changes: 22 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,32 @@
A simple fetch in C which is tiny and fast.. it takes 0.001 to 0.004s to fetch

## Depends
- only c compiler and `TERM`, `LANG`, `USER`, `SHELL` environmental variables
- `TERM`, `LANG`, `USER`, `SHELL` environmental variables
- gcc
- make

## Installation

1. **Clone the repository:**
```bash
git clone [https://github.com/abrik1/tinyfetch](https://github.com/abrik1/tinyfetch)
cd tinyfetch
```

2. **Configuration (Optional):**
Edit src/config.h to customize the output.

3. **Build:**
```bash
make
```
4. **Install:**
```bash
sudo make install
```
$ git clone https://github.com/abrik1/tinyfetch
$ cd tinyfetch/src
$ vim config.h # if you want to change config
$ gcc tinyfetch.c -o tinyfetch
$ ./tinyfetch
## Uninstall
```bash
sudo make uninstall
```
## Preview

Expand Down
Binary file added tinyfetch
Binary file not shown.