Replace the two scripts with a single Makefile.
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>
Sat, 12 May 2012 16:46:18 +0000 (09:46 -0700)
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>
Sat, 12 May 2012 16:46:18 +0000 (09:46 -0700)
Makefile [new file with mode: 0644]
dist.sh [deleted file]
fetch.sh [deleted file]

diff --git a/Makefile b/Makefile
new file mode 100644 (file)
index 0000000..a27933b
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,15 @@
+# can be replaced with `wget -q -O -` if you want
+HTTPCAT = curl
+
+fetch:
+       $(HTTPCAT) http://pci-ids.ucw.cz/v2.2/pci.ids.bz2 | bzcat > pci.ids
+       $(HTTPCAT) http://www.linux-usb.org/usb.ids.bz2 | bzcat > usb.ids
+
+PV ?= $(shell date +%Y%m%d)
+P = hwids-$(PV)
+
+dist: $(P).tar.xz
+
+$(P).tar.xz:
+       git tag $(P)
+       git archive --prefix=$(P)/ $(P) | xz -9e > $(P).tar.xz
diff --git a/dist.sh b/dist.sh
deleted file mode 100755 (executable)
index c39289b..0000000
--- a/dist.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-PV=${1:-$(date +%Y%m%d)}
-P=hwids-${PV}
-
-git tag ${P}
-git archive --prefix=${P}/ ${P} | xz -9e > ${P}.tar.xz
diff --git a/fetch.sh b/fetch.sh
deleted file mode 100755 (executable)
index 6846191..0000000
--- a/fetch.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-
-curl http://pci-ids.ucw.cz/v2.2/pci.ids.bz2 | bzcat > pci.ids
-curl http://www.linux-usb.org/usb.ids.bz2 | bzcat > usb.ids