summaryrefslogtreecommitdiff
blob: 52a3bf2217a4e9265268dc7fcf6f55100d792a30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.PHONY: all
all: wondershaper.config wondershaper

wondershaper.config:
	tail -n+2 wshaper \
	| awk '/^# Now remove/{firstPartOver=1}{if (! firstPartOver) print $0}' \
	>> $@
wondershaper: wshaper
	cp rc.skel $@
	awk '/^if \[/{firstPartOver=1}{if (firstPartOver) print $0}' $^ \
	| awk -f append-return-1.awk \
	| sed 's/exit/return 0/' >> $@
	echo "}" >> $@

clean:
	rm wondershaper wondershaper.config