Makefile: simplify fetching.
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>
Fri, 16 Nov 2012 04:23:39 +0000 (20:23 -0800)
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>
Fri, 16 Nov 2012 04:23:39 +0000 (20:23 -0800)
Makefile

index 08e8170d49207bc27d5ff362c7130c9c5b7a61df..58592e50611f5db5e796329b2b669230e065f7d1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -14,7 +14,7 @@ fetch:
        $(Q)$(HTTPCAT) http://www.linux-usb.org/usb.ids.bz2 | bzcat > usb.ids
        $(Q)$(STATUS)
 
-PV ?= $(shell date +%Y%m%d)
+PV ?= $(shell awk '$$2 == "Date:" { gsub("-", "", $$3); print $$3; nextfile }' pci.ids usb.ids | sort | tail -n 1)
 P = hwids-$(PV)
 
 tag: