summaryrefslogtreecommitdiff
path: root/grype/Makefile
blob: 39885407ee7323378d02d3bc0c81ba60ca1dc5d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
VERSION := "invalid"
GITHUB_BASEURL := "https://github.com/anchore/grype/releases/download"

.PHONY: clean

all: amd64/grype arm64/grype

%/grype: grype_$(VERSION)_linux_%.tar.gz
	mkdir -p $(shell echo $@ | sed 's#/.*##')
	tar -C $(shell echo $@ | sed 's#/.*##') -xzf "$<"

grype_$(VERSION)_linux_%.tar.gz:
	wget -nc --progress=dot:mega "$(GITHUB_BASEURL)/v$(VERSION)/$@" -O "$@"
	sha256sum -c --ignore-missing sha256sums.txt

clean:
	rm -rf amd64
	rm -rf arm64
	rm -f grype_*_linux_*.tar.gz