~dricottone/parcels

ref: 75aedb86f7d1710ef6c88668b184745c3bbe6c9b parcels/Makefile -rw-r--r-- 569 bytes
75aedb86Dominic Ricottone Update go version 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
URL_ICANN=https://data.iana.org/TLD/tlds-alpha-by-domain.txt

build/top-level-domains.txt:
	curl -o build/top-level-domains.txt $(URL_ICANN)

regexp.go: build/top-level-domains.txt
	tail +2 build/top-level-domains.txt \
		| perl -pe 'chomp if eof' \
		| tr '[:upper:]' '[:lower:]' \
		| tr '\n' '|' > build/regexp.go-part2
	cat <(perl -pe 'chomp if eof' build/regexp.go-part1) \
		<(perl -pe 'chomp if eof' build/regexp.go-part2) \
		build/regexp.go-part3 \
		> regexp.go

.PHONY: clean
clean:
	rm -f parcels regexp.go go.sum

.PHONY: build
build: regexp.go
	go build