#!/bin/sh

set -e

filename="$1"

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

echo "# Listing generated by fglrx_supported. Do not edit manually."

strings "$filename" | \
  sed -n 's/^0x\([0-9A-F]\{4\}\)$/alias pci:v00001002d0000\1sv*sd*bc03sc*i* fglrx/p' | \
  sort | uniq
