mirror of
https://github.com/celogeek/imgcat.git
synced 2025-05-24 07:52:35 +02:00
update build
This commit is contained in:
parent
188efdbfa1
commit
5b74921ced
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
bin
|
||||
imgcat
|
||||
|
17
Makefile
17
Makefile
@ -1,15 +1,14 @@
|
||||
SRC=./cmd
|
||||
BINARY=imgcat
|
||||
BINARY_SRC=$(SRC)/imgcat
|
||||
SOURCES=$(shell find $(BINARY_SRC) -name "*.go")
|
||||
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
DIST=./bin
|
||||
SRC=./cmd
|
||||
BINARY=$(DIST)/imgcat
|
||||
BINARY_SRC=$(SRC)/imgcat
|
||||
SOURCE=$(shell find $(BINARY_SRC) -name "*.go")
|
||||
|
||||
$(BINARY): $(SOURCE)
|
||||
go build -trimpath -o $(BINARY) $(BINARY_SRC)
|
||||
$(BINARY): $(SOURCES)
|
||||
go build $(BINARY_SRC)
|
||||
|
||||
all: $(BINARY) test
|
||||
|
||||
test:
|
||||
$(BINARY) -url "https://images.pexels.com/photos/2558605/pexels-photo-2558605.jpeg?cs=srgb&dl=pexels-anel-rossouw-2558605.jpg&fm=jpg" -height 25
|
||||
./$(BINARY) -url "https://images.pexels.com/photos/2558605/pexels-photo-2558605.jpeg?cs=srgb&dl=pexels-anel-rossouw-2558605.jpg&fm=jpg" -height 25
|
||||
|
@ -15,13 +15,13 @@ make
|
||||
|
||||
Or directly
|
||||
```
|
||||
go build -trimpath -o ./bin/imgcat ./cmd/imgcat
|
||||
go build ./cmd/imgcat
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
./bin/imgcat -url "https://images.pexels.com/photos/2558605/pexels-photo-2558605.jpeg?cs=srgb&dl=pexels-anel-rossouw-2558605.jpg&fm=jpg" -height 25
|
||||
./imgcat -url "https://images.pexels.com/photos/2558605/pexels-photo-2558605.jpeg?cs=srgb&dl=pexels-anel-rossouw-2558605.jpg&fm=jpg" -height 25
|
||||
```
|
||||
|
||||
<img width="1069" alt="Capture d’écran 2021-12-11 à 17 40 55" src="https://user-images.githubusercontent.com/65178/145684510-39617c22-5818-4573-896c-7e0e6915db91.png">
|
||||
|
Loading…
x
Reference in New Issue
Block a user