| 1 |
#! /bin/bash |
| 2 |
|
| 3 |
# Script to update pci and usb id data. |
| 4 |
# |
| 5 |
# Just run it. |
| 6 |
|
| 7 |
[ -x convert_hd -a -d src ] || { |
| 8 |
echo "this script must be run in the 'src/ids' directory" |
| 9 |
exit 1 |
| 10 |
} |
| 11 |
|
| 12 |
curl --fail -o pci.ids http://pci-ids.ucw.cz/v2.2/pci.ids || { |
| 13 |
echo "oops, no pci ids" |
| 14 |
exit 1 |
| 15 |
} |
| 16 |
|
| 17 |
curl --fail -o usb.ids http://www.linux-usb.org/usb.ids || { |
| 18 |
echo "oops, no usb ids" |
| 19 |
exit 1 |
| 20 |
} |
| 21 |
|
| 22 |
# keep only device info in usb list |
| 23 |
# (delete everything beginning with the class definitions) |
| 24 |
perl -pi -e 'undef $_ if /^C\s/..1' usb.ids |
| 25 |
|
| 26 |
./convert_hd pci.ids && mv hd.ids src/pci |
| 27 |
./convert_hd usb.ids && mv hd.ids src/usb |
| 28 |
|
| 29 |
rm -f pci.ids usb.ids |