summarylogtreecommitdiffstats
path: root/mhwd-ati
blob: cf96c146c7dd15dfd73229ea23b987fa5b96eb23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

filename="$1"

[ -e "$filename" ] || {
    echo "USAGE: $0 path/to/fglrxko_pci_ids.h" >&2
    exit 1
}

printf '%s\n' '# List generated by mhwd. Do not edit manually.'

grep "0x" "$filename" | \
  cut -d, -f1 | sed s/0x// | sed 's/"//g' | \
  sort | uniq | sed -e 's/^[ \t]*//'