summaryrefslogtreecommitdiff
path: root/addons/x11phonehome/usr/local/bin/pickxconfig
blob: 51b8f41dae3adffe99b878634b750edfba3db2e4 (plain)
  1. #!/bin/sh
  2. # FIXME: Why won't this work?
  3. #cfgmaybe=`lspci | perl -n -e 's¡^.* VGA .*:\W(\w*).*¡/etc/X11/XF86Config-4-$1¡i && print if -f'`
  4. cfgbase="/etc/X11/xorg.conf"
  5. cfgmaybe="$cfgbase-`lspci | perl -n -e 's¡^.* VGA .*:\W(\w*).*¡$1¡i && print'`"
  6. if [ -r "$cfgmaybe" ]; then
  7. echo "$cfgmaybe"
  8. else
  9. echo "$cfgbase"
  10. fi