]> git.ipfire.org Git - thirdparty/systemd.git/blame - tools/update-hwdb.sh
Merge pull request #18863 from keszybz/cmdline-escaping
[thirdparty/systemd.git] / tools / update-hwdb.sh
CommitLineData
7629744a 1#!/bin/sh
9ee03516 2# SPDX-License-Identifier: LGPL-2.1-or-later
7629744a 3set -eu
abba22c5 4
3b6fd3c1 5cd "${1:?}"
734005fe 6
299597f8 7unset permissive
d5ef342d 8if [ "${2:-}" = "-p" ]; then
cc5549ca
ZJS
9 permissive=1
10 shift
d5ef342d 11else
cc5549ca 12 permissive=0
299597f8
ZJS
13fi
14
4af1aea4 15if [ "${2:-}" != "-n" ]; then (
cc5549ca
ZJS
16 [ -z "$permissive" ] || set +e
17 set -x
299597f8 18
79758570
ZJS
19 curl --fail -L -o usb.ids 'http://www.linux-usb.org/usb.ids'
20 curl --fail -L -o pci.ids 'http://pci-ids.ucw.cz/v2.2/pci.ids'
21 curl --fail -L -o ma-large.txt 'http://standards-oui.ieee.org/oui/oui.txt'
22 curl --fail -L -o ma-medium.txt 'http://standards-oui.ieee.org/oui28/mam.txt'
23 curl --fail -L -o ma-small.txt 'http://standards-oui.ieee.org/oui36/oui36.txt'
24 curl --fail -L -o pnp_id_registry.html 'https://uefi.org/uefi-pnp-export'
25 curl --fail -L -o acpi_id_registry.html 'https://uefi.org/uefi-acpi-export'
4af1aea4 26) fi
c6801f50 27
4af1aea4 28set -x
91dab98f 29./acpi-update.py >20-acpi-vendor.hwdb.base
abba22c5 30patch -p0 -o- 20-acpi-vendor.hwdb.base <20-acpi-vendor.hwdb.patch >20-acpi-vendor.hwdb
3b6fd3c1 31diff -u 20-acpi-vendor.hwdb.base 20-acpi-vendor.hwdb >20-acpi-vendor.hwdb.patch && exit 1
c6801f50
ZJS
32
33./ids_parser.py