]> mj.ucw.cz Git - pciids.git/commitdiff
Export script
authorMichal Vaner <vorner@ucw.cz>
Sun, 31 Aug 2008 14:14:23 +0000 (16:14 +0200)
committerMichal Vaner <vorner@ucw.cz>
Sun, 31 Aug 2008 14:14:23 +0000 (16:14 +0200)
scripts/pciids-export [new file with mode: 0755]

diff --git a/scripts/pciids-export b/scripts/pciids-export
new file mode 100755 (executable)
index 0000000..6ef54e4
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+set -e
+
+cd ~vorner/www/pci-ids2.ucw.cz/
+cp /home/pciids/head.ids pci.ids.new
+./scripts/export.pl | sed -e '/^ffff/r class_head.ids' >> pci.ids.new
+if ! [ -f static/pci.ids ] || ! diff static/pci.ids pci.ids.new >/dev/null ; then
+       cp pci.ids.new ~/origs/00-current
+       mv pci.ids.new static/pci.ids
+       bzip2 -9c <static/pci.ids >static/pci.ids.bz2
+       gzip -9c <static/pci.ids >static/pci.ids.gz
+else
+       rm pci.ids.new
+fi