#!/bin/sh # copy this needed file from the catalyst build dir /pkgbuilds/catalyst/src/archive_files/common/lib/modules/fglrx/build_mod/fglrxko_pci_ids.h # and place in th same dir as this script set -e filename="$1" [ -e "$filename" ] || { echo "USAGE: $0 path/to/fglrxko_pci_ids.h" >&2 exit 1 } echo "# Listing generated by fglrx_supported_chakra-20120703." echo "# Do not edit manually." echo "# (C) 2012 The Chakra Project Team" grep "0x" "$filename" | \ sed -n 's/FGL_ASIC_ID(0x\([0-9A-F]\{4\}\)),$/0x\1/p' | \ sort | uniq | sed -e 's/^[ \t]*//'